<%-- 
    Document   : tabbedpanelcontent
    Created on : 07 13, 11, 10:27:38 AM
    Author     : Lee
--%>

<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<div id="loaninfo"  >
    <s:form theme="simple" action="update-la" id="loanapplicationform" cssStyle="clear: both">
        <div style="height: 440px; width: 100%; padding: 0">
            <fieldset style="width: 100%">
                <legend><h3>Loan Application Details</h3></legend>
                <s:div id="document">

                    <table cellspacing="0" border="0" width="100%">
                        <tr>
                            <td><s:label>Document:</s:label></td>
                            <td><div class="inputContainer"><s:textfield id="documenttype" cssStyle="font-size: 11px; width: 100px" name="documenttype" label="Document Type" value="Loan Application" readonly="true"/></div></td>
                            <td><s:label>Application Date:</s:label></td>
                            <td><div class="inputContainer"><sj:datepicker name="documentdate" cssStyle="font-size: 11px; width: 100px" value="%{#gp.loanver.documents.documentdate}" id="documentdate" label="Document Date" cssClass="validate[required] text-input" /></div></td>
                            <td><s:label>Application No.:</s:label></td>
                            <td><div class="inputContainer"><s:textfield name="documentno" cssStyle="font-size: 11px; width: 100px" value="%{#gp.loanver.documents.documentno}" id="documentno" label="Document No."/></div></td>
                        </tr>
                    </table>
                    <table cellspacing="0" border="0" width="100%">
                        <tr>
                            <td style="visibility: hidden">HAHAHAH</td>
                        </tr>
                    </table>
                    <table cellspacing="0" border="0" width="100%">
                        <tr>
                            <td style="display: none"><s:textfield name="loanverid" value="%{#gp.loanver.loanverificationid}"/></td>
                            <td><s:label>Borrower ID:</s:label></td>
                            <td style="display: none"><s:textfield cssStyle="font-size: 11px; width: 100px;" value="%{#gp.borrowerinfo.borrowercode}" label="Borrower Code" key="borrower.borrowerid" readonly="true" name="borcode" id="borid"/></td>
                            <td><s:textfield cssStyle="font-size: 11px; width: 100px;" value="%{#gp.borrowerinfo.borrowerid}" label="Borrower Code" key="borrower.borrowerid" readonly="true" name="borid" id="borid"/></td>
                            <td><s:label>Borrower Name:</s:label></td>
                                <td>
                                    <div class="inputContainer" style="width: 165px; display: inline"><s:textfield cssStyle="font-size: 11px; width: 160px" label="First Name" key="bor.firstname" value="%{#gp.borrowerinfo.firstname}" name="firstname" id="firstname" cssClass="validate[required] text-input" /></div>
                                <div class="inputContainer" style="width: 165px; display: inline"><s:textfield cssStyle="font-size: 11px; width: 160px" label="Middle Name" key="bor.middlename" value="%{#gp.borrowerinfo.middlename}" name="middlename" id="middlename" title="Please enter your username (at least 3 characters)" cssClass="validate[required] text-input" /></div>
                                <div class="inputContainer" style="width: 165px; display: inline"><s:textfield cssStyle="font-size: 11px; width: 160px" label="Last Name" key="bor.lastname" value="%{#gp.borrowerinfo.lastname}" name="lastname" id="lastname" title="Please enter your username (at least 3 characters)" cssClass="validate[required] text-input" /></div>
                            </td>
                        </tr>
                    </table>
                    <table cellspacing="0" border="0" width="100%">
                        <tr>
                            <td><s:label>Area Code</s:label></td>
                                <td>
                                    <div class="inputContainer">
                                    <s:select
                                        cssStyle="font-size: 11px"
                                        label="Area Code:"
                                        name="selectedArea"
                                        id="selectedArea"
                                        list="%{#a.areas}"
                                        listKey ="areacode"
                                        listValue="areacode"
                                        headerKey="-1"
                                        headerValue=""
                                        emptyOption="false"
                                        cssClass="validate[required]"
                                        value="%{#gp.borrowerinfo.areas.areacode}"
                                        />
                                </div>
                            </td> 
                            <td><s:label>Current Address</s:label></td>
                                <td>
                                    <div class="inputContainer" style="display: inline"><s:textfield cssStyle="font-size: 11px; width: 170px" label="Street Address" value="%{#gp.borrowerinfo.streetaddress}"  key="bor.streetaddress" name="streetaddress" id="streetaddress" cssClass="validate[required]" /></div>
                                <div class="inputContainer" style="display: inline"><s:textfield cssStyle="font-size: 11px; width: 170px" label="Barangay" value="%{#gp.borrowerinfo.barangay}"  key="bor.barangay" name="barangay" id="barangay" cssClass="validate[required]"/></div>
                                <div class="inputContainer" style="display: inline"><s:textfield cssStyle="font-size: 11px; width: 170px" label="City or Municipality" value="%{#gp.borrowerinfo.cityormunicipality}"  key="bor.cityormunicipality" id="cityormunicipality" name="cityormunicipality" cssClass="validate[required]"/></div>
                                <div class="inputContainer" style="display: inline"><s:textfield cssStyle="font-size: 11px; width: 170px" label="Province" value="%{#gp.borrowerinfo.province}"  key="bor.province" id="province" name="province" cssClass="validate[required]"/></div>
                            </td>
                        </tr>
                        <tr style="display: none">
                            <td><s:label>Branch Code</s:label></td>
                            <td><s:textfield label="Branch Code:" name="selectedBranch" id="selectedBranch" value="%{#session['branch'].branchcode}" readonly="true"  /></td>
                            <td><s:label>Employee Id</s:label></td>
                            <td><s:textfield name="employees" id="employees" label="Employee Id" value="%{#session['employee'].idnumber}" readonly="true" key="loanapplications.employees" /><%-- --%></td>
                        </tr>
                    </table>

                </s:div>
                <s:div id="loan">
                    <table border="0" width="100%" id="loanapplicationform">
                        <tr>
                            <td><s:label>New Account No.</s:label></td>
                            <td><div class="inputContainer"><s:textfield cssStyle="font-size: 11px; width: 80px" id="newacctno" value="%{#request['accountno']}" name="accountno" label="Amortization Days" /></td>
                            <td><s:label>Loan Classification<strong>*</strong></s:label></td>
                                <td>
                                    <div class="inputContainer">
                                    <s:select
                                        id="loanclass"
                                        key="loanclass"
                                        cssClass="validate[required]"
                                        label="Loan Classification"
                                        name="loantype"
                                        list="{'New','Renew'}"
                                        headerKey="-1"
                                        headerValue=""
                                        readonly="true"
                                        emptyOption="false"
                                        value="%{#gp.loanver.loantype}" />
                            </td>
                            <td><s:label>Loan Type<strong>*</strong></s:label></td>
                            <td><div class="inputContainer"><s:select
                                        id="loantype"
                                        key="loantype"
                                        cssClass="validate[required]"
                                        label="Loan Type"
                                        name="loanclassification"
                                        list="%{#p.products}"
                                        listKey ="productname"
                                        listValue="productname"
                                        headerKey="-1"
                                        readonly="true"
                                        headerValue=""
                                        value="%{#gp.loanver.products.productname}"
                                        emptyOption="false"
                                        /></td>
                        </tr>
                        <tr>
                            <td>
                                <s:label>Loan Term<strong>*</strong></s:label>
                                </td>
                                <td>
                                    <div class="inputContainer"><s:textfield value="%{#gp.loanver.loanterm}" readonly="true" id="amortizationdays" name="loanterm" label="Amortization Days" cssClass="validate[required] text-input" /><%-- --%>
                            </td>
                            <td>
                                <s:label>Amount Applied<strong>*</strong></s:label>
                                </td>
                                <td>
                                    <div class="inputContainer"><s:textfield id="amountrequested1" readonly="true" value="%{#gp.loanver.amountapplied}" name="amountapplied" label="Amount Requested" key="loanapplications.amountrequested" cssClass="validate[required] text-input"/><%-- --%>
                            </td>
                            <td>
                                <s:label>Amount Requested<strong>*</strong></s:label>
                                </td>
                                <td>
                                    <div class="inputContainer"><s:textfield id="amountrequested" value="%{#gp.loanver.amountrequested}" name="amountrequested" label="Amount Requested" key="loanapplications.amountrequested" cssClass="validate[required] text-input"/><%-- --%>
                            </td>
                        </tr>
                    </table>
                </s:div>
            </fieldset>
        </div>
        <s:div id="buttons" cssStyle="float:right">
            <%--<s:if test="%{#privilege1e.allowable == true}">--%>
            <s:if test="%{#gp.loanver.status == 'Saved'}">
                <sj:a
                    name="saveLA"
                    id="saveLA"
                    onclick="postLoanApp()"
                    button="true"
                    >
                    Post to Loan Request
                </sj:a>
                <%--<sj:submit cssClass="ui-state-default" value="Post Loan Application" button="true" cssStyle="float:right;margin-top:2px;font-size:12px !important;font-family: Tahoma, Geneva, sans-serif !important;" />--%>
            </s:if>
            <s:else>
                <h4>This loan application was already posted.</h4>
                <%--<sj:submit cssClass="ui-state-default" value="Post Loan Application" button="true" cssStyle="float:right;margin-top:2px;font-size:12px !important;font-family: Tahoma, Geneva, sans-serif !important;" />--%>
            </s:else>
            <%--</s:if>--%>
            <%--            <s:else>
                            <s:if test="%{#gp.loanver.status == 'saved'}">
                                <h4>This loan application was already saved.</h4>
                                <sj:submit cssClass="ui-state-default" value="Post Loan Application" button="true" cssStyle="float:right;margin-top:2px;font-size:12px !important;font-family: Tahoma, Geneva, sans-serif !important;" />
                            </s:if>
                        </s:else>--%>
        </s:div> 
    </s:form>
</div>
<div id="loanborrowerinfo" style="padding: 0">
    <s:div id="application">
        <s:form id="loanappform" name="loanappform" action="update-af" theme="simple" cssClass="cmxform" method="post" enctype="multipart/form-data">
            <s:if test="%{#gp.loaninfo != null}">
                <!--                            Borrower Information-->
                <s:div id="document">
                    <fieldset>
                        <legend>
                            <h3>Document Information</h3>
                        </legend>
                        <table cellspacing="0" border="0" width="100%">
                            <tr>
                                <td style="display: none"><s:textfield name="id" cssStyle="font-size: 11px; width: 100px" id="documentno" value="%{#gp.loaninfo.loanappid}" label="Document No."/></td>
                                <td><s:label>Document:</s:label></td>
                                <td><div class="inputContainer"><s:textfield id="documenttype" cssStyle="font-size: 11px; width: 100px" name="documenttype" label="Document Type" value="Application Form" readonly="true"/></div></td>
                                <td><s:label>Document Date:<strong>*</strong></s:label></td>
                                <td><div class="inputContainer"><sj:datepicker name="documentdate" value="%{#gp.loaninfo.documents.documentdate}" cssStyle="font-size: 11px; width: 100px" id="documentdate" label="Document Date" cssClass="validate[required] text-input" /></div></td>
                                <td><s:label>Document No.:<strong>*</strong></s:label></td>
                                <td><div class="inputContainer"><s:textfield name="documentno" cssStyle="font-size: 11px; width: 100px" id="documentno" value="%{#gp.loaninfo.documents.documentno}" label="Document No."/></div></td>
                                <td><s:label>Document Image:</s:label></td>
                                <td><s:file name="userImage" id="userImage" label="User Image" cssStyle="font-size: 11px; width: 120px" /></td>
                            </tr>
                            <tr>
                                <td><s:label>Document Ref</s:label></td><td><s:textfield readonly="true" id="docreftypeci" cssStyle="font-size: 11px; width: 100px" name="docreftypeci" label="Document Ref Type" value="Loan Application" /></td>
                                <td><s:label>Document Ref No.</s:label></td><td><s:textfield readonly="true" id="docrefnoci" cssStyle="font-size: 11px; width: 100px" name="docrefnoci" value="%{#gp.loanver.documents.documentno}" label="Document Ref No." /></td>
                                <td><s:label>Document Ref Date</s:label></td><td><s:textfield name="docdate" cssStyle="font-size: 11px; width: 100px" label="Document Date" readonly="true" value="%{#gp.loanver.documents.documentdate}" /></td>
                                <td style="display: none"><s:label>Loan Verification ID</s:label></td><td style="display: none"><s:textfield name="loanverid" cssStyle="font-size: 11px; width: 100px" label="loanverid" readonly="true" value="%{#gp.loanver.loanverificationid}" /></td>
                                </tr>
                                <tr>
                                    <td><s:label>Borrower Code:</s:label></td>
                                <td><div class="inputContainer"><s:textfield cssStyle="font-size: 11px; width: 100px" label="Borrower Code" key="borrower.borrowerid" readonly="true" name="borid" id="borid" value="%{#gp.borrowerinfo.borrowercode}"/></div></td>
                                <td><s:label>Borrower Name:</s:label></td>
                                <td><div class="inputContainer"><s:textfield cssStyle="font-size: 11px; width: 100px" label="Borrower Name" key="borrower.borrowerfirstname" readonly="true" name="borname" id="borname" value="%{#gp.borrowerinfo.completename}"/></div></td>
                            </tr>
                            <tr style="display: none">
                                <td><s:label>Branch Code</s:label></td>
                                <td><s:textfield label="Branch Code:" name="selectedBranch" id="selectedBranch" value="%{#session['branch'].branchcode}" readonly="true"  /></td>
                                <td><s:label>Employee Id</s:label></td>
                                <td><s:textfield name="employees" id="employees" label="Employee Id" value="%{#session['employee'].idnumber}" readonly="true" key="loanapplications.employees" /><%-- --%></td>
                            </tr>
                            <tr style="display: none;">
                                <td><s:label>Status</s:label></td>
                                <td><s:textfield label="Status" key="loanapplciations.status" name="status" id="status" value="pending"/></td>
                            </tr>
                        </table>
                    </fieldset>
                    <s:div id="navigation">
                        <ul class="fragmentnav" style="margin-left: 30px;">
                            <li><s:a href="#document">Document Information |</s:a></li>
                            <li><s:a href="#borrower" > Borrower Information |</s:a></li>
                            <li><s:a href="#spouse" > Spouse and Dependents |</s:a></li>
                            <li><s:a href="#business" > Business Information |</s:a></li>
                            <li><s:a href="#coborrower" > Co-borrower and References |</s:a></li>
                            <li><s:a href="#requirements" > Requirements</s:a></li>
                            </ul>
                    </s:div>
                </s:div>
                <s:div id="applicationoverflow" cssStyle="height: 340px; overflow: auto">
                    <div id="borrower">
                        <fieldset>
                            <legend>
                                <h3>Borrower Information</h3>
                            </legend>
                            <table cellspacing="0" border="0" width="100%">
                                <tr>
                                    <td colspan="6" style="font-size: 12px; font-weight: bold;"><s:label cssStyle="font-size: 12px; font-weight: bold;">Borrower Name</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="6" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <!--                        <tr><td><span style="color: red; font-size: 10px">Note: Fields marked with (*) are required.</td></span></tr>-->
                                    <tr>
                                        <td><s:label>First Name<strong>*</strong></s:label></td><td>
                                        <div class="inputContainer"><s:textfield label="First Name" key="bor.firstname" value="%{#gp.borrowerinfo.firstname}" name="firstname" id="firstname" cssClass="validate[required] text-input" /></div></td>
                                    <td><s:label>Middle Name<strong>*</strong></s:label></td><td>
                                        <div class="inputContainer"><s:textfield label="Middle Name" key="bor.middlename" value="%{#gp.borrowerinfo.middlename}" name="middlename" id="middlename" title="Please enter your username (at least 3 characters)" cssClass="validate[required] text-input"  /></div></td>
                                    <td> <s:label>Last Name<strong>*</strong></s:label></td><td>
                                        <div class="inputContainer"><s:textfield label="Last Name" key="bor.lastname" value="%{#gp.borrowerinfo.lastname}" name="lastname" id="lastname" title="Please enter your username (at least 3 characters)" cssClass="validate[required] text-input" /></div></td>
                                </tr>
                            </table>
                            <p style="visibility: hidden; margin: 0; padding:0">Divider</p>
                            <!--                    <hr />-->
                            <table cellspacing="0" border="0" width="100%">
                                <tr>
                                    <td><s:label>Area Code</s:label></td>
                                    <td><div class="inputContainer"><s:select
                                                label="Area Code:"
                                                name="selectedArea"
                                                id="selectedArea"
                                                list="%{#a.areas}"
                                                listKey ="areacode"
                                                listValue="areacode"
                                                headerKey="-1"
                                                readonly="true"
                                                headerValue=""
                                                emptyOption="false"
                                                cssClass="validate[required]"
                                                value="%{#gp.borrowerinfo.areas.areacode}"
                                                /></td>  
                                </tr>
                                <tr>
                                    <td colspan="5" style="font-size: 12px; font-weight: bold;"><s:label cssStyle="font-size: 12px; font-weight: bold;">Current Home Address</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="5" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <tr>
                                        <td><s:label>Street Address<strong>*</strong></s:label></td>
                                    <td><s:label>Barangay<strong>*</strong></s:label><%-- --%></td>
                                    <td><s:label>Municipality/City<strong>*</strong></s:label><%-- --%></td>
                                    <td><s:label>Postal Code<strong>*</strong></s:label><%-- --%></td>
                                    <td><s:label>Province<strong>*</strong></s:label><%-- --%></td>
                                    </tr>
                                    <tr>
                                    </tr>
                                    <td>
                                        <div class="inputContainer"><s:textfield label="Street Address" value="%{#gp.borrowerinfo.streetaddress}"  key="bor.streetaddress" name="streetaddress" id="streetaddress" cssStyle="width: 160px" cssClass="validate[required]" />
                                </td>
                                <td>
                                    <div class="inputContainer"><s:textfield label="Barangay" value="%{#gp.borrowerinfo.barangay}"  key="bor.barangay" name="barangay" id="barangay" cssClass="validate[required]"/>
                                </td>
                                <td>
                                    <div class="inputContainer"><s:textfield label="City or Municipality" value="%{#gp.borrowerinfo.cityormunicipality}"  key="bor.cityormunicipality" id="cityormunicipality" name="cityormunicipality" cssClass="validate[required]"/>
                                </td>
                                <td>
                                    <div class="inputContainer"><s:textfield label="Postal Code" value="%{#gp.borrowerinfo.postalcode}"  key="bor.postalcode" id="postalcode" name="postalcode" cssClass="validate[required]"/>
                                </td>
                                <td>
                                    <div class="inputContainer"><s:textfield label="Province" value="%{#gp.borrowerinfo.province}"  key="bor.province" id="province" name="province" cssClass="validate[required]"/>
                                </td>
                                </tr>
                                <tr>
                                    <td colspan="3"><s:label>Present Address Stability<strong>*</strong></s:label><%-- --%>
                                        <div class="inputContainer"><s:select
                                                id="presentaddressstatus"
                                                key="loanapplications.presentaddressstatus"
                                                cssClass="validate[required]"
                                                label="Stability"
                                                name="presentaddressstatus"
                                                list="{'Renting','Owned/Mortgage','Owned/Clean Title','Free'}"
                                                headerKey="-1"
                                                headerValue=""
                                                emptyOption="false"
                                                value="%{#gp.loaninfo.presentaddressstatus}" /><%-- --%>
                                    </td>
                                    <td><s:label>Years of Stay<strong>*</strong></s:label><%-- --%>
                                        <div class="inputContainer"><s:select
                                                id="presentaddresslengthofstayinyears"
                                                cssStyle="width: 40px;"
                                                cssClass="validate[required]"
                                                key="loanapplications.presentaddresslengthofstayinyears"
                                                label="years"
                                                name="presentaddresslengthofstayinyears"
                                                list="{'0','1','2','3','4','5','6','7','8','9','10'}"
                                                headerKey="-1"
                                                headerValue=""
                                                emptyOption="false"
                                                value="%{#gp.loaninfo.presentaddresslengthofstayinyears}" />
                                    </td>
                                    <td><s:label>Months of Stay<strong>*</strong></s:label><%-- --%>
                                        <div class="inputContainer"><s:select
                                                id="presentaddresslengthofstayinmonths"
                                                cssStyle="width: 40px;"
                                                cssClass="validate[required]"
                                                key="loanapplications.presentaddresslengthofstayinmonths"
                                                label="months"
                                                name="presentaddresslengthofstayinmonths"
                                                list="{'1','2','3','4','5','6','7','8','9','10','11','12'}"
                                                headerKey="-1"
                                                headerValue=""
                                                emptyOption="false"
                                                value="%{#gp.loaninfo.presentaddresslengthofstayinmonths}" />
                                    </td>
                                </tr>
                            </table>
                            <p style="visibility: hidden; margin: 0; padding:0">Divider</p>
                            <!--                    <hr />-->
                            <table width="100%">
                                <tr>
                                    <td colspan="5" style="font-size: 12px; font-weight: bold;"><s:label cssStyle="font-size: 12px; font-weight: bold;">Provincial Home Address</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="5" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <tr>
                                        <td><s:label>Street Address<strong>*</strong></s:label></td>
                                    <td><s:label>Barangay<strong>*</strong></s:label><%-- --%></td>
                                    <td><s:label>Municipality/City<strong>*</strong></s:label><%-- --%></td>
                                    <td><s:label>Postal Code<strong>*</strong></s:label><%-- --%></td>
                                    <td><s:label>Province<strong>*</strong></s:label><%-- --%></td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="inputContainer"><s:textfield id="provincialstreetaddress" name="provincialstreetaddress" value="%{#gp.loaninfo.provincialstreetaddress}" label="Street No." key="loanapplications.provincialstreetaddress" cssStyle="width: 160px" cssClass="validate[required]" />
                                    </td>
                                    <td>
                                        <div class="inputContainer"><s:textfield id="provincialbarangay" name="provincialbarangay" value="%{#gp.loaninfo.provincialbarangay}" label="Barangay" key="loanapplications.provincialbarangay" cssClass="validate[required]"/>
                                    </td>
                                    <td>
                                        <div class="inputContainer"><s:textfield id="provincialcityormunicipality" name="provincialcityormunicipality" value="%{#gp.loaninfo.provincialcityormunicipality}" label="Municipality/City" key="loanapplications.provincialcityormunicipality" cssClass="validate[required]"/>
                                    </td>
                                    <td>
                                        <div class="inputContainer"><s:textfield id="provincialpostalcode" name="provincialpostalcode" value="%{#gp.loaninfo.provincialpostalcode}" label="Postal Code" key="loanapplications.provincialpostalcode" cssClass="validate[required]"/>
                                    </td>
                                    <td>
                                        <div class="inputContainer"><s:textfield id="provincialprovince" name="provincialprovince" value="%{#gp.loaninfo.provincialprovince}" label="Province" key="loanapplications.provincialprovince" cssClass="validate[required]"/>
                                    </td>

                                </tr>
                                <tr>
                                    <td colspan="3"><s:label>Provincial Address Stability<strong>*</strong></s:label><%-- --%>
                                        <div class="inputContainer"><s:select
                                                id="provincialaddressstatus"
                                                key="loanapplications.provincialaddressstatus"
                                                cssClass="validate[required]"
                                                label="Stability"
                                                name="provincialaddressstatus"
                                                list="{'Renting','Owned/Mortgage','Owned/Clean Title','Free'}"
                                                headerKey="-1"
                                                headerValue=""
                                                emptyOption="false"
                                                value="%{#gp.loaninfo.provincialaddressstatus}" /><%-- --%>
                                            <s:label label="Length of Stay"/>
                                    </td>
                                    <td><s:label>Years of Stay<strong>*</strong></s:label><%-- --%>
                                        <div class="inputContainer"><s:select
                                                id="provincialaddresslengthofstayinyears"
                                                cssStyle="width: 40px;"
                                                cssClass="validate[required]"
                                                key="loanapplications.provincialaddresslengthofstayinyears"
                                                label="years"
                                                name="provincialaddresslengthofstayinyears"
                                                list="{'0','1','2','3','4','5','6','7','8','9','10'}"
                                                headerKey="-1"
                                                headerValue=""
                                                emptyOption="false"
                                                value="%{#gp.loaninfo.provincialaddresslengthofstayinyears}" />
                                    </td>
                                    <td><s:label>Months of Stay<strong>*</strong></s:label><%-- --%>
                                        <div class="inputContainer"><s:select
                                                id="provincialaddresslengthofstayinmonths"
                                                cssStyle="width: 40px;"
                                                cssClass="validate[required]"
                                                key="loanapplications.provincialaddresslengthofstayinmonths"
                                                label="months"
                                                name="provincialaddresslengthofstayinmonths"
                                                list="{'1','2','3','4','5','6','7','8','9','10','11','12'}"
                                                headerKey="-1"
                                                headerValue=""
                                                emptyOption="false"
                                                value="%{#gp.loaninfo.provincialaddresslengthofstayinmonths}" />
                                    </td>
                                </tr>
                            </table>
                            <p style="visibility: hidden; margin: 0; padding:0">Divider</p>
                            <!--                    <hr />-->
                            <table cellspacing="0" border="0"  width="100%">
                                <tr>
                                    <td colspan="6" style="font-size: 12px; font-weight: bold;"><s:label cssStyle="font-size: 12px; font-weight: bold;">Personal Information</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="6" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <tr>
                                        <td><s:label>Date of Birth<strong>*</strong></s:label></td><td>
                                        <div class="inputContainer"><sj:datepicker label="Date of Birth" key="bor.dateofbirth" value="%{#gp.borrowerinfo.dateofbirth}" name="dateofbirth" id="dateofbirth" displayFormat="mm/dd/yy" cssClass="validate[required]" /><%-- --%></td>
                                    <td><s:label>Age<strong>*</strong></s:label></td><td>
                                        <s:textfield label="Age" key="bor.age" name="age" id="age" value="%{#gp.borrowerinfo.age}" /><%-- --%></td>
                                    <td><s:label>Place of Birth<strong>*</strong></s:label></td><td>
                                        <div class="inputContainer"><s:textfield label="Place of Birth" key="bor.placeofbirth" value="%{#gp.borrowerinfo.placeofbirth}" name="placeofbirth" id="placeofbirth" cssClass="validate[required]" /><%-- --%></td>
                                </tr>
                                <tr>
                                    <td><s:label>Religion<strong>*</strong></s:label></td><td>
                                        <div class="inputContainer"><s:textfield id="religion" label="Religion" key="bor.religion" value="%{#gp.borrowerinfo.religion}" name="religion" cssClass="validate[required]" /><%-- --%></td>
                                    <td><s:label>Citizenship<strong>*</strong></s:label></td><td>
                                        <div class="inputContainer"><s:textfield id="citizenship" label="Citizenship" key="bor.citizenship" value="%{#gp.borrowerinfo.citizenship}" name="citizenship" cssClass="validate[required]"  /><%-- --%></td>
                                    <td><s:label>Civil Status<strong>*</strong></s:label></td><td>
                                        <div class="inputContainer"><s:select
                                                id="selectedStatus"
                                                label="Civil Status"
                                                name="selectedStatus"
                                                list="{'Single','Married','Separated','Annulled','Widowed'}"
                                                headerKey="-1"
                                                headerValue=""
                                                emptyOption="false"
                                                cssClass="validate[required]"
                                                value="%{#gp.borrowerinfo.civilstatus}" /><%-- --%></td>
                                </tr>
                                <tr>
                                    <td><s:label>Contact No.</s:label></td><td>
                                        <s:textfield label="Contact No." name="contactno" id="contactno" value="%{#gp.borrowerinfo.contactnumber}" /><%-- --%></td>
                                </tr>
                            </table>
                        </fieldset>
                    </div>
                    <div id="spouse">
                        <fieldset>
                            <legend>
                                <h3>Spouse and Dependents</h3>
                            </legend>
                            <table  cellspacing="0" border="0"  width="100%"> 
                                <tr>
                                    <td colspan="6" style="font-size: 12px; font-weight: bold;"><s:label cssStyle="font-size: 12px; font-weight: bold;">Spouse Name</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="6" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <tr>
                                        <td><s:label>First Name</s:label></td><td>
                                        <s:textfield id="spouserfirstname" name="spousefirstname" value="%{#gp.loaninfo.spousefirstname}" label="First Name" key="loanapplications.spousefirstname" /></td>
                                    <td><s:label>Middle Name</s:label></td><td>
                                        <s:textfield id="spousemiddlename" name="spousemiddlename" value="%{#gp.loaninfo.spousemiddlename}" label="Middle Name" key="loanapplications.spousemiddlename"/></td>
                                    <td> <s:label>Last Name</s:label></td><td>
                                        <s:textfield id="spouselastname" name="spouselastname" value="%{#gp.loaninfo.spouselastname}" label="Last Name" key="loanapplications.spouselastname"/></td>
                                </tr>
                            </table>
                            <p style="visibility: hidden; margin: 0; padding:0">Divider</p>
                            <table width="100%">
                                <tr>
                                    <td colspan="5" style="font-size: 12px; font-weight: bold;"><s:label cssStyle="font-size: 12px; font-weight: bold;">Spouse Provincial Home Address</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="6" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <tr>
                                        <td><s:label>Street Address</s:label></td>
                                    <td><s:label>Barangay</s:label><%-- --%></td>
                                    <td><s:label>Municipality/City</s:label><%-- --%></td>
                                    <td><s:label>Postal Code</s:label><%-- --%></td>
                                    <td><s:label>Province</s:label><%-- --%></td>
                                    </tr>
                                    <tr>
                                        <td>
                                        <s:textfield id="spouseprovincialstreetaddress" value="%{#gp.loaninfo.spouseprovincialstreetaddress}" name="spouseprovincialstreetaddress" label="Street Address" key="loanapplications.spouseprovincialstreetaddress" cssStyle="width: 160px"/>
                                    </td>
                                    <td>
                                        <s:textfield id="spouseprovincialbarangay" value="%{#gp.loaninfo.spouseprovincialbarangay}" name="spouseprovincialbarangay" label="Barangay" key="loanapplications.spouseprovincialbarangay"/>
                                    </td>
                                    <td>
                                        <s:textfield id="spouseprovincialcityormunicipality" value="%{#gp.loaninfo.spouseprovincialcityormunicipality}" name="spouseprovincialcityormunicipality" label="Municipality/City" key="loanapplications.spouseprovincialcityormunicipality"/>
                                    </td>
                                    <td>
                                        <s:textfield id="spouseprovincialpostalcode" value="%{#gp.loaninfo.spouseprovincialpostalcode}" name="spouseprovincialpostalcode" label="Postal Code" key="loanapplications.spouseprovincialpostalcode"/>
                                    </td>
                                    <td>
                                        <s:textfield id="sprovprovince" value="%{#gp.loaninfo.spouseprovincialprovince}" name="spouseprovincialprovince" label="Province" key="loanapplications.spouseprovincialprovince"/>
                                    </td>

                                </tr>
                            </table>
                            <p style="visibility: hidden; margin: 0; padding:0">Divider</p>
                            <table width="100%">
                                <tr>
                                    <td colspan="5" style="font-size: 12px; font-weight: bold;"><s:label cssStyle="font-size: 12px; font-weight: bold;">Spouse Personal Information</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="6" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <tr>
                                        <td><s:label>Date of Birth</s:label></td><td>
                                        <sj:datepicker id="spousedateofbirth" name="spousedateofbirth" value="%{#gp.loaninfo.spousedateofbirth}" label="Date of Birth" key="loanapplications.spousedateofbirth" /></td>
                                    <td><s:label>Place of Birth</s:label></td><td>
                                        <s:textfield id="spouseplaceofbirth" name="spouseplaceofbirth" value="%{#gp.loaninfo.spouseplaceofbirth}" label="Place of Birth" key="loanapplications.spouseplaceofbirth"/></td>
                                    <td><s:label>Religion</s:label></td><td>
                                        <s:textfield id="spousereligion" name="spousereligion" value="%{#gp.loaninfo.spousereligion}" label="Religion" key="loanapplications.spousereligion"/></td>
                                </tr>
                                <tr>
                                    <td><s:label>Citizenship</s:label></td><td>
                                        <s:textfield id="spousecitizenship" name="spousecitizenship" label="Citizenship" value="%{#gp.loaninfo.spousecitizenship}" key="loanapplications.spousecitizenship"/></td>
                                </tr>
                            </table>
                            <p style="visibility: hidden; margin: 0; padding:0">Divider</p>
                            <table id="tbldependent" border="0" width="100%">
                                <tr>
                                    <td colspan="5" style="font-size: 12px; font-weight: bold;"><s:label cssStyle="font-size: 12px; font-weight: bold;">Children/Dependents</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="6" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td>Name</td>
                                        <td>Relationship</td>
                                        <td>Age</td>
                                    </tr>
                                <s:iterator value="%{#gp.dependents}">
                                    <tr id="tobecloned">
                                        <td id="labelto">1</td>
                                        <td>
                                            <input id="dependentname" name="dependentname" value="<s:property value="name"/>" label="Name" key="dependents.name" cssStyle="width: 200px"/><%-- --%>
                                        </td>
                                        <td>
                                            <input id="dependentrelationship" name="dependentrelationship" value="<s:property value="relationship"/>" label="Relationship" key="dependents.relationship"/><%-- --%>
                                        </td>
                                        <td>
                                            <input id="dependentage" name="dependentage" value="<s:property value="age"/>" label="Age" cssStyle="width: 80px"/>
                                        </td>
                                    </tr>
                                </s:iterator>
                            </table>

                            <p><input type="button" id="btndependent" value="Add More" /></p>
                        </fieldset>
                    </div>
                    <div id="business">
                        <fieldset>
                            <legend>
                                <h3>Business Information</h3>
                            </legend>
                            <table border="0" id="tblbus" width="100%">
                                <tr>
                                    <td colspan="5" style="font-size: 12px; font-weight: bold;"><s:label cssStyle="font-size: 12px; font-weight: bold;">Business Name and Type</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="5" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <tr><td><span style="color: red; font-size: 10px">Note: At least one (1) business is required.</td></span></tr>
                                    <tr>
                                        <td></td>
                                        <td>Business Type</td>
                                        <td>Business Name</td>
                                    </tr>
                                <s:iterator value="%{#gp.business}" status="stat">
                                    <tr id="tobeclonedbus">
                                        <td><label><s:property value="#stat.count" /></label></td>
                                        <td>
                                            <div class="inputContainer"><s:textfield name="businesstype" id="businesstype" label="Business Type" key="businesses.businesstype" cssClass="validate[required]" /></div>
                                        </td>
                                        <td>
                                            <div class="inputContainer"><s:textfield name="businessname" id="businessname" label="Business Name" key="businesses.businessname" cssClass="validate[required]" /></div>
                                        </td>
                                    </tr>
                                </s:iterator>
                            </table>
                            <p><input type="button" id="btnbus" value="Add More" /></p>
                            <table id="tbladdress" width="100%">
                                <tr>
                                    <td colspan="5" style="font-size: 12px; font-weight: bold;"><s:label cssStyle="font-size: 12px; font-weight: bold;">Business Address</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="5" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>

                                    <tr>
                                        <td></td>
                                        <td><s:label>Street Address<strong>*</strong></s:label></td>
                                    <td><s:label>Barangay<strong>*</strong></s:label><%-- --%></td>
                                    <td><s:label>Municipality/City<strong>*</strong></s:label><%-- --%></td>
                                    <td><s:label>Postal Code<strong>*</strong></s:label><%-- --%></td>
                                    <td><s:label>Province<strong>*</strong></s:label><%-- --%></td>
                                    </tr>
                                <s:iterator value="%{#gp.business}" status="stat">
                                    <tr id="tobeclonedaddress">
                                        <td><label><s:property value="#stat.count" /></label></td>
                                        <td>
                                            <div class="inputContainer"><input value="<s:property value="streetaddress"/>" name="businessstreetaddress" id="businessstreetaddress" label="Street No." key="businesses.streetaddress"  cssStyle="width: 160px" cssClass="validate[required]"/>
                                        </td>
                                        <td>
                                            <div class="inputContainer"><input value="<s:property value="barangay"/>" name="businessbarangay" id="businessbarangay" label="Barangay" key="businesses.barangay" cssStyle="float: left" cssClass="validate[required]"/>
                                        </td>
                                        <td>
                                            <div class="inputContainer"><input value="<s:property value="cityormunicipality"/>" name="businesscityormunicipality" id="businesscityormunicipality" label="Municipality/City" key="businesses.cityormunicipality" cssClass="validate[required]" />
                                        </td>
                                        <td>
                                            <div class="inputContainer"><input value="<s:property value="postalcode"/>" name="businesspostalcode" id="businesspostalcode" label="Postal Code" key="businesses.postalcode" cssClass="validate[required]" />
                                        </td>
                                        <td>
                                            <div class="inputContainer"><input value="<s:property value="province"/>" name="businessprovince" id="businessprovince" label="Province" key="businesses.province" cssClass="validate[required]" />
                                        </td>
                                    </tr>
                                </s:iterator>
                            </table>
                            <table id="tblstability">
                                <tr>
                                    <td></td>
                                    <td><s:label>Business Stability</s:label></td>
                                    <%--<td><s:label>Years in business</s:label></td>
                                    <td><s:label>Months in Business</s:label></td>--%>
                                </tr>
                                <s:iterator value="%{#gp.business}" status="stat">
                                    <tr id="tobeclonedstability">
                                        <td>1</td>
                                        <td><%-- --%>
                                            <s:set name="bustab" value="stability" var="bustab" />
                                            <s:select
                                                label="Stability"
                                                id="businessstability"
                                                name="stability"
                                                list="{'Renting','Owned/Mortgage','Owned/Clean Title','Free'}"
                                                headerKey="-1"
                                                headerValue=""
                                                emptyOption="false"
                                                value="%{#bustab}" /><%-- --%></td>
                                            <%--<td>
                                                <s:select
                                                    id="businessyears"
                                                    cssStyle="width: 40px;"
                                                    label="years"
                                                    list="{'0','1','2','3','4','5','6','7','8','9','10'}"
                                                    headerKey="-1"
                                                    headerValue=""
                                                    emptyOption="false"
                                                    value="" /></td>
                                            <td>
                                                <s:select
                                                    id="businessmonths"
                                                    cssStyle="width: 40px;"
                                                    label="months"
                                                    list="{'1','2','3','4','5','6','7','8','9','10','11','12'}"
                                                    headerKey="-1"
                                                    headerValue=""
                                                    emptyOption="false"
                                                    value="" /></td>--%>
                                    </tr>
                                </s:iterator>
                            </table>
                            <p><input type="button" id="btndependent" value="Add More" /></p>
                            <table border="0">
                                <tr>
                                    <td colspan="5" style="font-size: 12px; font-weight: bold;"><s:label cssStyle="font-size: 12px; font-weight: bold;">Statement of Monthly Income</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="5" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <tr>
                                        <td>
                                        <s:label>Business<strong>*</strong></s:label></td><td>
                                        <s:textfield id="business" name="business" label="Business" value="%{#gp.monthlyincome.business}" key="monthlyincome.business"/><%-- --%>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <s:label>Employment<strong>*</strong></s:label></td><td>
                                        <s:textfield id="employement" name="employement" label="employment" value="%{#gp.monthlyincome.employement}" key="monthlyincome.employement"/><%-- --%>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <s:label>Spouse Income<strong>*</strong></s:label></td><td>
                                        <s:textfield id="spouseincome" name="spouseincome" label="Spouse Income" value="%{#gp.monthlyincome.spouseincome}" key="monthlyincome.spouseincome"/><%-- --%>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <s:label>Other Sources<strong>*</strong></s:label></td><td>
                                        <s:textfield id="othersources" name="othersources" label="Other Sources" value="%{#gp.monthlyincome.othersources}" key="monthlyincome.othersources"/><%-- --%>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <s:label>Gross Income<strong>*</strong></s:label></td><td>
                                        <div class="inputContainer"><s:textfield id="grossincome" name="grossincome" label="Gross Income" value="%{#gp.monthlyincome.othersources}" key="monthlyincome.grossincome" cssClass="validate[required]" /><%-- --%>
                                    </td>
                                </tr>
                                <tr><td colspan="2" style="font-size: 12px; font-weight: bold;"><s:label>Less Expenses</td></s:label></tr>
                                    <tr>
                                        <td>
                                        <s:label>Rent<strong>*</strong></s:label></td><td>
                                        <s:textfield id="rentexpense" name="rentexpense" label="Rent" value="%{#gp.monthlyincome.rentexpense}" key="monthlyincome.rentexpense"/><%-- --%>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <s:label>Food and Clothing<strong>*</strong></s:label></td><td>
                                        <s:textfield id="foodandclothing" name="foodandclothing" label="Food and Clothing" value="%{#gp.monthlyincome.foodandclothing}" key="monthlyincome.foodandclothing"/><%-- --%>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <s:label>Education<strong>*</strong></s:label></td><td>
                                        <s:textfield id="education" name="education" label="Education" value="%{#gp.monthlyincome.education}" key="monthlyincome.education"/><%-- --%>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <s:label>Outstanding Loan<strong>*</strong></s:label></td><td>
                                        <s:textfield id="outstandingloan" name="outstandingloan" label="Outstanding Loan" value="%{#gp.monthlyincome.outstandingloan}" key="monthlyincome.outstandingloan"/><%-- --%>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <s:label>Total Expenses<strong>*</strong></s:label></td><td>
                                        <s:textfield id="totalexpenses" name="totalexpenses" label="Total Expenses" value="%{#gp.monthlyincome.totalexpenses}" key="monthlyincome.totalexpenses"/><%-- --%>
                                    </td>
                                </tr>
                                <tr>
                                    <td><s:label>Net Income Before Tax<strong>*</strong></s:label></td><td>
                                        <div class="inputContainer"><s:textfield id="netincomebeforetax" value="%{#gp.monthlyincome.netincomebeforetax}" name="netincomebeforetax" label="Net Income Before Tax" key="monthlyincome.netincomebeforetax" cssClass="validate[required]"/><%-- --%>
                                    </td>
                                </tr>
                            </table>
                            <table border="0" id="tblloan" width="100%">
                                <tr>
                                    <td colspan="5" style="font-size: 12px; font-weight: bold;"><s:label cssStyle="font-size: 12px; font-weight: bold;">Loans with Banks and Other Institutions</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="5" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td><s:label>Name</s:label></td>
                                    <td><s:label>Principal Amount</s:label></td>
                                    <td><s:label>Balance</s:label></td>
                                    </tr>
                                <s:iterator value="%{#gp.lwob}" status="stat">
                                    <tr id="tobeclonedloan">
                                        <td><label><s:property value="#stat.count" /></label></td>
                                        <td>
                                            <s:textfield id="bankname" name="bankname" label="Name" key="loanswithoterbanks.bankname" cssStyle="300px"/><%-- --%>
                                        </td>
                                        <td>
                                            <s:textfield id="principalamt" name="principalamt" label="Principal Amount" key="loanswithoterbanks.principalamt"/><%-- --%>
                                        </td>
                                        <td>
                                            <s:textfield id="balance" name="balance" label="Balance" key="loanswithoterbanks.balance"/><%-- --%>
                                        </td>
                                    </tr>
                                </s:iterator>
                            </table>
                            <p><input type="button" id="btnloans" value="Add More" /></p>
                        </fieldset>
                    </div>
                    <div id="coborrower">
                        <fieldset>
                            <legend>
                                <h3>Co-borrower and Character References</h3>
                            </legend>
                            <table border="0" width="100%">
                                <tr>
                                    <td colspan="5" style="font-size: 12px; font-weight: bold;"><s:label cssStyle="font-size: 12px; font-weight: bold;">Co-borrower Name</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="5" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <tr>
                                        <td>
                                        <s:label>First Name</s:label>
                                        <s:textfield name="coborrowerfirstname" value="%{#gp.loaninfo.coborrowerfirstname}" id="coborrowerfirstname" label="First Name" key="loanapplications.coborrowerfirstname" />
                                    </td>
                                    <td>
                                        <s:label>Middle Name</s:label>
                                        <s:textfield name="coborrowermiddlename" value="%{#gp.loaninfo.coborrowermiddlename}" id="coborrowermiddlename" label="Middle Name" key="loanapplications.coborrowermiddlename" />

                                    </td>
                                    <td>
                                        <s:label>Last Name</s:label>
                                        <s:textfield name="coborrowerlastname" value="%{#gp.loaninfo.coborrowerlastname}" id="coborrowerlastname" label="Last Name" key="loanapplications.coborrowerlastname" />
                                    </td>
                                    <td>
                                        <s:label>Religion</s:label>
                                        <s:textfield name="coborrowerreligion" value="%{#gp.loaninfo.coborrowerreligion}" id="coborrowerreligion" label="Religion" key="loanapplications.spousereligion"/>
                                    </td>
                                </tr>
                            </table>
                            <p style="visibility: hidden; margin: 0; padding:0">Divider</p>
                            <table border="0" width="100%">
                                <tr>
                                    <td colspan="5" style="font-size: 12px; font-weight: bold;"><s:label cssStyle="font-size: 12px; font-weight: bold;">Co-borrower Address</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="5" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <tr>
                                        <td>
                                        <s:label>Street No.</s:label>
                                        <s:textfield name="coborrowerstreetaddress" value="%{#gp.loaninfo.coborrowerstreetaddress}" id="coborrowerstreetaddress" label="Street No." key="loanapplications.coborrowerstreetaddress" />
                                    </td>
                                    <td>
                                        <s:label>Barangay</s:label><%-- --%>
                                        <s:textfield name="coborrowerbarangay" value="%{#gp.loaninfo.coborrowerbarangay}" id="coborrowerbarangay" label="Barangay" key="loanapplications.coborrowerbarangay"/>
                                    </td>
                                    <td>
                                        <s:label>Municipality/City</s:label><%-- --%>
                                        <s:textfield name="coborrowercityormunicipality" value="%{#gp.loaninfo.coborrowercityormunicipality}" id="coborrowercityormunicipality" label="Municipality/City" key="loanapplications.coborrowercityormunicipality"/>
                                    </td>
                                    <td>
                                        <s:label>Province</s:label><%-- --%>
                                        <s:textfield name="coborrowerprovince" value="%{#gp.loaninfo.coborrowerprovince}" id="coborrowerprovince" label="Province" key="loanapplications.coborrowerprovince"/>
                                    </td>
                                    <td>
                                        <s:label>Postal Code</s:label><%-- --%>
                                        <s:textfield name="coborrowerpostalcode" value="%{#gp.loaninfo.coborrowerpostalcode}" id="coborrowerpostalcode" label="Postal Code" key="loanapplications.coborrowerpostalcode"/>
                                    </td>
                                </tr>
                            </table>
                            <p style="visibility: hidden; margin: 0; padding:0">Divider</p>
                            <table border="0" id="tblreferences" width="100%">
                                <tr>
                                    <td colspan="5" style="font-size: 12px; font-weight: bold;"><s:label cssStyle="font-size: 12px; font-weight: bold;">Character and Credit References</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="5" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <tr><td colspan="4"><span style="color: red; font-size: 10px">Note: At least one (1) character reference is required.</td></span></tr>
                                    <tr>
                                        <td></td>
                                        <td><s:label>Name<strong>*</strong></s:label></td>
                                    <td><s:label>Address<strong>*</strong></s:label></td>
                                    <td><s:label>Position/Occupation<strong>*</strong></s:label></td>
                                    </tr>
                                <s:iterator value="%{#gp.references}">
                                    <tr id="tobeclonedreferences">
                                        <td>1</td>
                                        <td width="25%">
                                            <div class="inputContainer"><input value="<s:property value="name"/>" id="referencename" name="referencename" label="Name" key="characterreferences.name" cssStyle="width: 100%" cssClass="validate[required]" />
                                        </td>
                                        <td <td width="50%">
                                            <div class="inputContainer"><input value="<s:property value="address"/>" id="referenceaddress" name="referenceaddress" label="Address" key="characterreferences.address" cssStyle="width: 100%" cssClass="validate[required]" />
                                        </td>
                                        <td <td width="25%">
                                            <div class="inputContainer"><input value="<s:property value="occupation"/>" id="referenceoccupation" name="referenceoccupation" label="Position/Occupation" key="characterreferences.occupation" cssStyle="width: 100%" cssClass="validate[required]" />
                                        </td>
                                    </tr>
                                </table>
                            </s:iterator>
                            <p><input type="button" id="btnreferences" value="Add More" /></p>
                        </fieldset>
                    </div>
                    <div id="requirements">
                        <fieldset>
                            <legend>
                                <h3>Requirements</h3>
                            </legend>
                            <table width="100%">
                                <tr>
                                    <td colspan="5" style="font-size: 12px; font-weight: bold;"><s:label cssStyle="font-size: 12px; font-weight: bold;">* At least 2 requirements are required.</s:label></td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div class="inputContainer">
                                            <s:iterator value="%{#gp.checkedreqs}">
                                                <s:set name="rname" value="requirementname" var="rname" />
                                                <s:checkbox cssClass="validate[minCheckbox[2]] checkbox" name="requirement" id="%{#rname}" value="true" fieldValue="%{#rname}" key="reputation.type" /><s:label><s:property value="requirementname"/></s:label><br />
                                            </s:iterator>
                                            <s:iterator value="%{#gp.uncheckedreqs}">
                                                <s:set name="rname" value="requirementname" var="rname" />
                                                <s:checkbox cssClass="validate[minCheckbox[2]] checkbox" name="requirement" id="%{#rname}" value="false" fieldValue="%{#rname}" key="reputation.type" /><s:label><s:property value="requirementname"/></s:label><br />
                                            </s:iterator>
                                        </div>
                                    </td> 
                                </tr>

                            </table>
                        </fieldset>
                    </div>
                </s:div>
                <s:div id="buttons" cssStyle="float:right">
                    <%--<s:if test="%{#privilege1e.allowable == true}">--%>
                    <s:if test="%{#gp.loaninfo.status == 'saved'}">
                        <sj:a
                            name="postAF"
                            id="postAF"
                            onclick="postAF()"
                            button="true"
                            >
                            Post to Head Office
                        </sj:a>
                        <%--<sj:submit cssClass="ui-state-default" value="Post Application Form" button="true" cssStyle="float:left;margin-top:2px;font-size:12px !important;font-family: Tahoma, Geneva, sans-serif !important;" />--%>
                    </s:if>
                    <s:else>
                        <h4>This application form was already posted.</h4>
                        <%--<sj:submit cssClass="ui-state-default" disabled="true" value="Post Application Form" button="true" cssStyle="float:left;margin-top:2px;font-size:12px !important;font-family: Tahoma, Geneva, sans-serif !important;" />--%>
                    </s:else>
                    <%--</s:if>
                    <s:else>
                        <s:if test="%{#gp.loaninfo.status == 'saved'}">
                            <h4>This application was already saved.</h4>
                            <sj:submit cssClass="ui-state-default" value="Post Loan Application" button="true" cssStyle="float:right;margin-top:2px;font-size:12px !important;font-family: Tahoma, Geneva, sans-serif !important;" />
                        </s:if>
                    </s:else>--%>

                </s:div>
            </s:if>
            <s:else>
                <s:div cssStyle="width: 200px; margin-left: auto; margin-right: auto">
                    <h3> No application form yet.</h3>
                    <p> Click <strong><em><a href="loanapplication.jsp?cat=appli">here</a></em></strong> to add now. </p>
                </s:div>
            </s:else>
        </s:form> 
    </s:div>
</div>
<div id="ci" style="padding: 0">
    <s:div id="creditinvestigation">
        <s:div cssStyle="width: 40%; position: fixed; top: 145px" >
            <s:set name="stat" value="actionstatus1"/>
            <s:if test="%{#stat!=null}">
                <s:if test="%{#stat!='ok'}">
                    <dl class="ui-state-error ui-corner-all">
                        <dt><span class="ui-icon ui-icon-alert"></span><s:property value="#stat"/></dt>
                    </dl>
                </s:if>
                <s:elseif test="%{#stat=='ok'}">
                    <dl class="ui-state-hightlight ui-corner-all">
                        <dt><span class="ui-icon ui-icon-info"></span>Credit Investigation Saved.</dt>
                    </dl>
                </s:elseif>
            </s:if>
            <s:set name="stat" value="message"/>
            <s:if test="%{#stat!=null}">
                <s:if test="%{#stat!='ok'}">
                    <dl class="ui-state-error ui-corner-all">
                        <dt><span class="ui-icon ui-icon-alert"></span><s:property value="#stat"/></dt>
                    </dl>
                </s:if>
            </s:if>
        </s:div>

        <s:form id="creditform" name="creditform" action="update-ci" theme="simple"  method="post" enctype="multipart/form-data">
            <s:if test="%{#gp.creditinv != null}">
                <s:div>
                    <fieldset>
                        <legend>
                            <h3>Document Information</h3>
                        </legend>
                        <table border="0" width="100%" id="tablecidoc">
                            <tr>
                                <td style="display: none"><s:textfield name="ciid" cssStyle="font-size: 11px; width: 100px" value="%{#gp.creditinv.creditinvid}" label="Document No."/></td>
                                <td><s:label>Document</s:label></td><td><s:textfield id="doctypeci" cssStyle="font-size: 11px; width: 100px" name="doctypeci" label="Document Type" value="Credit Investigation" /></td>
                                <td><s:label>Document No.</s:label></td><td><s:textfield id="docnoci" cssStyle="font-size: 11px; width: 100px" name="docnoci" label="Document No." value="%{#gp.creditinv.documents.documentno}" /></td>
                                <td><s:label>Document Date</s:label></td><td><div class="inputContainer"><sj:datepicker cssStyle="font-size: 11px; width: 100px" name="docdate" value="%{#gp.creditinv.documents.documentdate}" label="Document Date" cssClass="validate[required]" /></div></td>
                                <td><s:label>Document Image</s:label></td><td><s:file name="userImage" label="User Image" cssStyle="font-size: 10px; width: 140px"/></td>
                                </tr>
                                <tr>
                                    <td><s:label>Document Ref</s:label></td><td><s:textfield readonly="true" id="docreftypeci" cssStyle="font-size: 11px; width: 100px" name="docreftypeci" label="Document Ref Type" value="Loan Application" /></td>
                                <td><s:label>Document Ref No.</s:label></td><td><s:textfield readonly="true" id="docrefnoci" cssStyle="font-size: 11px; width: 100px" name="docrefnoci" value="%{#gp.loanver.documents.documentno}" label="Document Ref No." /></td>
                                <td><s:label>Document Ref Date</s:label></td><td><s:textfield name="docdate" cssStyle="font-size: 11px; width: 100px" label="Document Date" readonly="true" value="%{#gp.loanver.documents.documentdate}" /></td>
                                <td style="display: none"><s:label>Loan Verification ID</s:label></td><td style="display: none"><s:textfield name="loanverid" cssStyle="font-size: 11px; width: 100px" label="loanverid" readonly="true" value="%{#gp.loanver.loanverificationid}" /></td>
                                </tr>
                                <tr style="display: none">
                                    <td><s:label>Loan Application No.</s:label></td><td><s:textfield name="loanappid" label="Loan Application No." value="%{#gp.loaninfo.loanappid}"/></td>
                                <td style="display: none"><s:label>Employee Id</s:label></td><td><s:textfield name="employeeid" value="%{#session['employee'].idnumber}" readonly="true" label="Employee Id"/></td>
                                </tr>
                            </table>
                        </fieldset>
                    <s:div id="navigation">
                        <ul class="fragmentnav" style="margin-left: 35px;">
                            <li><s:a href="#divnickname">Nickname |</s:a></li>
                            <li><s:a href="#divcurrent"> Current Addr. |</s:a></li>
                            <li><s:a href="#divbusiness" > Place of Business |</s:a></li>
                            <li><s:a href="#divvehicles" > Vehicles |</s:a></li>
                            <li><s:a href="#divosi" > Other Source of Income |</s:a></li>
                            <li><s:a href="#diveduc" > Educational Attainment |</s:a></li>
                            <li><s:a href="#divprev" > Previous Addr. |</s:a></li>
                            <li><s:a href="#divparent" > Parents' Info |</s:a></li>
                            <li><s:a href="#divinlaw" > Parents-in-laws' Info</s:a></li>
                            </ul>
                            <ul class="fragmentnav" style="margin-left: 10px;">
                                <li><s:a href="#divprp" > Personal and Real Properties |</s:a></li>
                            <li><s:a href="#divonr" > Other Notes Receivables |</s:a></li>
                            <li><s:a href="#divrep" > Reputation |</s:a></li>
                            <li><s:a href="#divinf" > Informants |</s:a></li>
                            <li><s:a href="#divdocs" > Docs Presented |</s:a></li>
                            <li><s:a href="#divosa" > Observational and Situational Analysis |</s:a></li>
                            <li><s:a href="#diveval" > Eval. and Recommendations</s:a></li>
                            </ul>
                    </s:div>
                </s:div>
                <s:div id="creditoverflow" cssStyle="height: 340px; overflow: auto">
                    <fieldset id="divnickname">
                        <legend>
                            <h3>Borrower's Nickname</h3>
                        </legend>
                        <table width="100%">
                            <tr>
                                <td><s:label>Borrower's Full Name: </s:label></td>
                                <td><div class="inputContainer"><s:textfield id="nickname" label="Nickname" value="%{#gp.loaninfo.borrowername}" key="creditinvestigations.nickname" cssClass="validate[required] text-input" /></div></td>
                                <td><s:label>Nickname: </s:label></td>
                                <td><div class="inputContainer"><s:textfield id="nickname" name="nickname" label="Nickname" value="%{#gp.creditinv.nickname}" key="creditinvestigations.nickname" cssClass="validate[required] text-input" /></div></td>
                            </tr>
                        </table>
                    </fieldset>
                    <fieldset id="divcurrent">
                        <legend>
                            <h3>Current Address Description</h3>
                        </legend>
                        <table border="0" width="100%">
                            <tr>
                                <td><s:label>Floor Area (sq.meters)</s:label></td>
                                    <td>
                                        <div class="inputContainer"><s:textfield id="cadfloorarea" name="addressfloorarea" label="Floor Area (sq.meters)" value="%{#gp.creditinv.addressfloorarea}" key="creditinvestigations.addressfloorarea" cssClass="validate[required,custom[integer]] text-input" /></div>
                                </td>
                                <td><s:label>Land Area (sq.meters)</s:label></td>
                                    <td>
                                        <div class="inputContainer"><s:textfield id="cadlandarea" name="addresslotarea" label="Land Area (sq.meters)" value="%{#gp.creditinv.addresslotarea}" key="creditinvestigations.addresslotarea" cssClass="validate[required,custom[integer]] text-input" /></div>
                                </td>
                                <td><s:label>Business Stability</s:label></td>
                                    <td>
                                        <div class="inputContainer">
                                        <s:select
                                            cssClass="validate[required]"
                                            key="creditinvestigations.addressstability"
                                            label="Stability"
                                            id="castability"
                                            name="addressstability"
                                            list="{'Owned','Mortgage','Renting','Living with Parents'}"
                                            headerKey="-1"
                                            headerValue="Please Select"
                                            emptyOption="false"
                                            value="%{#gp.creditinv.addressstability}" />
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td><s:label>Model</s:label></td>
                                    <td>
                                    <s:select
                                        key="creditinvestigations.addressmodel"
                                        label="Model"
                                        id="castability"
                                        name="addressmodel"
                                        list="{'Single Detach','Row House','Two Story','Duplex'}"
                                        headerKey="-1"
                                        headerValue="Please Select"
                                        emptyOption="false"
                                        value="%{#gp.creditinv.addressmodel}" /><%-- --%>
                                </td>
                                <td><s:label>Make</s:label></td>
                                    <td>
                                        <div class="inputContainer">
                                        <s:select
                                            cssClass="validate[required]"
                                            key="creditinvestigations.addressmake"
                                            label="Make"
                                            id="camake"
                                            name="addressmake"
                                            list="{'Concrete','Wood','Renting','Steel','Nipa','Fenced','Garage'}"
                                            headerKey="-1"
                                            headerValue="Please Select"
                                            emptyOption="false"
                                            value="%{#gp.creditinv.addressmake}" />
                                    </div>
                                </td>
                                <td><s:label>Land</s:label></td>
                                    <td>
                                        <div class="inputContainer">
                                        <s:select
                                            cssClass="validate[required]"
                                            key="creditinvestigations.addressland"
                                            label="Land"
                                            id="caland"
                                            name="addressland"
                                            list="{'Owned','Mortgage','Renting','Government'}"
                                            headerKey="-1"
                                            headerValue="Please Select"
                                            emptyOption="false"
                                            value="%{#gp.creditinv.addressland}" />
                                    </div>
                                </td>
                            </tr>
                        </table>
                        <table border="0" width="100%">
                            <tr>
                                <td><s:label>If renting:</s:label></td>
                                </tr>
                                <tr>
                                    <td><s:label>Name of Landlord</s:label></td>
                                <td><s:textfield name="addresslandlordname" label="Name of Landlord" value="%{#gp.creditinv.addresslandlordname}" /></td>
                                <td><s:label>Monthly Rental</s:label></td>
                                <td><s:textfield name="addressmonthlyrental" label="Monthly Rental" value="%{#gp.creditinv.addressmonthlyrental}" /></td>
                                <td><s:label>Landlord Address</s:label></td>
                                <td><s:textfield name="addresslandlordaddress" label="Landlord Address" value="%{#gp.creditinv.addresslandlordaddress}" /></td>
                                <td><s:label>Phone No.</s:label></td>
                                <td><s:textfield name="addresslandlordphoneno" label="Phone No." value="%{#gp.creditinv.addresslandlordphoneno}" /></td>
                            </tr>
                        </table>
                    </fieldset>
                    <s:if test="%{#gp.business != null}">
                        <fieldset id="divbusiness">
                            <legend>
                                <h3>Place of Business Description</h3>
                            </legend>
                            <table border="0">
                                <tr id="trid">
                                    <td style="display: none"></td>
                                    <s:iterator value="%{#gp.business}" status="stat">
                                        <td id="tobeclonedid" style="display: none"><s:textfield name="businessid" /></td>
                                    </s:iterator>
                                </tr>
                                <tr id="trname">
                                    <td>Business Name</td>
                                    <s:iterator value="%{#gp.business}" status="stat">
                                        <td id="tobeclonedname"><s:textfield name="businessname" title="Business Name" label="Business Name" /></td>
                                    </s:iterator>
                                </tr>
                                <tr id="trtype">
                                    <td>Business Type</td>
                                    <s:iterator value="%{#gp.business}" status="stat">
                                        <td id="tobeclonedtype"><s:textfield name="businesstype" title="Business Type" label="Business Type" /></td>
                                    </s:iterator>
                                </tr>
                                <tr id="trfloorarea">
                                    <td>Floor Area</td>
                                    <s:iterator value="%{#gp.business}" status="stat">
                                        <td id="tobeclonedfloorarea"><s:textfield id="pbdfloorarea" name="businessfloorarea" label="Floor Area (sq.meters)" cssStyle="width: 70px" key="businesses.floorarea" /> sq. meter</td>
                                    </s:iterator>
                                </tr>
                                <tr id="trlandarea">
                                    <td>Land Area</td>
                                    <s:iterator value="%{#gp.business}" status="stat">
                                        <td id="tobeclonedlandarea"><s:textfield id="pbdlandarea" name="businesslandarea" label="Land Area (sq.meters)" cssStyle="width: 70px" key="businesses.lotarea"/> sq. meter</td>
                                    </s:iterator>
                                </tr>
                                <tr id="trbusstability">
                                    <td>Business Stability</td>
                                    <s:iterator value="%{#gp.business}" status="stat">
                                        <td id="tobeclonedbusstability"><s:select
                                                cssStyle="width: 100%"
                                                key="businesses.stability"
                                                label="Stability"
                                                id="pbstability"
                                                name="businessstability"
                                                list="{'Owned','Mortgage','Renting','Living with Parents'}"
                                                headerKey="-1"
                                                headerValue="Please Select"
                                                emptyOption="false"
                                                value="Owned" /></td>
                                        </s:iterator>
                                </tr>
                                <tr id="trbusmodel">
                                    <td>Model</td>
                                    <s:iterator value="%{#gp.business}" status="stat">
                                        <td id="tobeclonedbusmodel">
                                            <s:select
                                                cssStyle="width: 100%"
                                                key="businesses.model"
                                                label="Model"
                                                id="pbmodel"
                                                name="businessmodel"
                                                list="{'Single Detach','Row House','Two Story','Duplex'}"
                                                headerKey="-1"
                                                headerValue="Please Select"
                                                emptyOption="false"
                                                value="Single Detach" /><%-- --%>
                                        </td>
                                    </s:iterator>
                                </tr>
                                <tr id="trbusmake">
                                    <td>Make</td>
                                    <s:iterator value="%{#gp.business}" status="stat">
                                        <td id="tobeclonedbusmake">
                                            <s:select
                                                cssStyle="width: 100%"
                                                key="businesses.make"
                                                label="Make"
                                                id="pbmake"
                                                name="businessmake"
                                                list="{'Concrete','Wood','Renting','Steel','Nipa','Fenced','Garage'}"
                                                headerKey="-1"
                                                headerValue="Please Select"
                                                emptyOption="false"
                                                value="Concrete" /><%-- --%>
                                        </td>
                                    </s:iterator>
                                </tr>
                                <tr id="trbusland">
                                    <td>Land</td>
                                    <s:iterator value="%{#gp.business}" status="stat">
                                        <td id="tobeclonedbusland">
                                            <s:select
                                                cssStyle="width: 100%"
                                                key="businesses.land"
                                                label="Land"
                                                id="pbland"
                                                name="businessland"
                                                list="{'Owned','Mortgage','Renting','Government'}"
                                                headerKey="-1"
                                                headerValue="Please Select"
                                                emptyOption="false"
                                                value="Owned" /><%-- --%>
                                        </td>
                                    </s:iterator>
                                </tr>
                                <tr id="trdas">
                                    <td>Daily Ave. Sales</td>
                                    <s:iterator value="%{#gp.business}" status="stat">
                                        <td id="tobecloneddas"><s:textfield name="dailyaveragesales" title="Daily Average Sales" label="DAS" /></td>
                                    </s:iterator>
                                </tr>
                                <tr><td>If renting:</td></tr>
                                <tr id="trlname">
                                    <td><s:label>Name of Landlord</s:label></td>
                                    <s:iterator value="%{#gp.business}" status="stat">
                                        <td id="tobeclonedlname"><s:textfield name="businesslandlordname" label="Name of Landlord"/></td>
                                    </s:iterator>
                                </tr>
                                <tr id="trrental">
                                    <td><s:label>Monthly Rental</s:label></td>
                                    <s:iterator value="%{#gp.business}" status="stat">
                                        <td id="tobeclonedrental"><s:textfield name="businessmonthlyrental" label="Monthly Rental"/></td>
                                    </s:iterator>
                                </tr>
                                <tr id="trladd">
                                    <td><s:label>Landlord Address</s:label></td>
                                    <s:iterator value="%{#gp.business}" status="stat">
                                        <td id="tobeclonedladd"><s:textfield name="businesslandlordaddress" label="Landlord Address"/></td>
                                    </s:iterator>
                                </tr>
                                <tr id="trphone">
                                    <td><s:label>Phone No.</s:label></td>
                                    <s:iterator value="%{#gp.business}" status="stat">
                                        <td id="tobeclonedphone"><s:textfield name="businesslandlordphoneno" label="Phone No."/></td>
                                    </s:iterator>
                                </tr>
                            </table>
                        </fieldset>
                        <p><input type="button" id="btnbusiness" value="Add More" style="display: none" /></p>
                        </s:if>
                        <s:else>
                        <fieldset id="divbusiness">
                            <legend>
                                <h3>Place of Business Description</h3>
                            </legend>
                            <table border="0">
                                <tr>
                                    <td colspan="6" style="font-size: 14px; font-weight: bold;"><s:label>Place of Business Description</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="6" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <tr id="trid">
                                        <td style="display: none"></td>
                                        <td id="tobeclonedid" style="display: none"><s:textfield name="businessid" /></td>
                                </tr>
                                <tr id="trname">
                                    <td>Business Name</td>
                                    <td id="tobeclonedname"><s:textfield name="businessname" title="Business Name" label="Business Name" /></td>
                                </tr>
                                <tr id="trtype">
                                    <td>Business Type</td>
                                    <td id="tobeclonedtype"><s:textfield name="businesstype" title="Business Type" label="Business Type" /></td>
                                </tr>
                                <tr id="trfloorarea">
                                    <td>Floor Area</td>
                                    <td id="tobeclonedfloorarea"><s:textfield id="pbdfloorarea" name="businessfloorarea" label="Floor Area (sq.meters)" cssStyle="width: 70px" key="businesses.floorarea" /> sq. meter</td>
                                </tr>
                                <tr id="trlandarea">
                                    <td>Land Area</td>
                                    <td id="tobeclonedlandarea"><s:textfield id="pbdlandarea" name="businesslandarea" label="Land Area (sq.meters)" cssStyle="width: 70px" key="businesses.lotarea"/> sq. meter</td>
                                </tr>
                                <tr id="trbusstability">
                                    <td>Business Stability</td>
                                    <td id="tobeclonedbusstability"><s:select
                                            cssStyle="width: 100%"
                                            key="businesses.stability"
                                            label="Stability"
                                            id="pbstability"
                                            name="businessstability"
                                            list="{'Owned','Mortgage','Renting','Living with Parents'}"
                                            headerKey="-1"
                                            headerValue="Please Select"
                                            emptyOption="false"
                                            value="Owned" /></td>
                                </tr>
                                <tr id="trbusmodel">
                                    <td>Model</td>
                                    <td id="tobeclonedbusmodel">
                                        <s:select
                                            cssStyle="width: 100%"
                                            key="businesses.model"
                                            label="Model"
                                            id="pbmodel"
                                            name="businessmodel"
                                            list="{'Single Detach','Row House','Two Story','Duplex'}"
                                            headerKey="-1"
                                            headerValue="Please Select"
                                            emptyOption="false"
                                            value="Single Detach" /><%-- --%>
                                    </td>
                                </tr>
                                <tr id="trbusmake">
                                    <td>Make</td>
                                    <td id="tobeclonedbusmake">
                                        <s:select
                                            cssStyle="width: 100%"
                                            key="businesses.make"
                                            label="Make"
                                            id="pbmake"
                                            name="businessmake"
                                            list="{'Concrete','Wood','Renting','Steel','Nipa','Fenced','Garage'}"
                                            headerKey="-1"
                                            headerValue="Please Select"
                                            emptyOption="false"
                                            value="Concrete" /><%-- --%>
                                    </td>
                                </tr>
                                <tr id="trbusland">
                                    <td>Land</td>
                                    <td id="tobeclonedbusland">
                                        <s:select
                                            cssStyle="width: 100%"
                                            key="businesses.land"
                                            label="Land"
                                            id="pbland"
                                            name="businessland"
                                            list="{'Owned','Mortgage','Renting','Government'}"
                                            headerKey="-1"
                                            headerValue="Please Select"
                                            emptyOption="false"
                                            value="Owned" /><%-- --%>
                                    </td>
                                </tr>
                                <tr id="trdas">
                                    <td>Daily Ave. Sales</td>
                                    <td id="tobecloneddas"><s:textfield name="dailyaveragesales" title="Daily Average Sales" label="DAS" /></td>
                                </tr>
                                <tr><td>If renting:</td></tr>
                                <tr id="trlname">
                                    <td><s:label>Name of Landlord</s:label></td>
                                    <td id="tobeclonedlname"><s:textfield name="businesslandlordname" label="Name of Landlord"/></td>
                                </tr>
                                <tr id="trrental">
                                    <td><s:label>Monthly Rental</s:label></td>
                                    <td id="tobeclonedrental"><s:textfield name="businessmonthlyrental" label="Monthly Rental"/></td>
                                </tr>
                                <tr id="trladd">
                                    <td><s:label>Landlord Address</s:label></td>
                                    <td id="tobeclonedladd"><s:textfield name="businesslandlordaddress" label="Landlord Address"/></td>
                                </tr>
                                <tr id="trphone">
                                    <td><s:label>Phone No.</s:label></td>
                                    <td id="tobeclonedphone"><s:textfield name="businesslandlordphoneno" label="Phone No."/></td>
                                </tr>
                            </table>
                        </fieldset>
                        <p><input type="button" id="btnbusiness" value="Add More" style="display: none" /></p>
                        </s:else>

                    <s:if test="%{#gp.vehicles != null}">
                        <fieldset id="divvehicles">
                            <legend>
                                <h3>Vehicles Owned</h3>
                            </legend>
                            <table border="0" id="tblvehicle" width="100%">
                                <tr>
                                    <td colspan="8" style="font-size: 14px; font-weight: bold;"><s:label>Vehicles Owned</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="8" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td><s:label>Type</s:label></td>
                                    <td><s:label>Make</s:label></td>
                                    <td><s:label>Model</s:label></td>
                                    </tr>
                                <s:iterator value="%{#gp.vehicles}" status="stat">
                                    <tr id="tobeclonedvehicle">
                                        <td><label><s:property value="#stat.count" /></label></td>
                                        <td><input id="typevehicle" name="vtype" value="<s:property value="type" />"  /></td>
                                        <td><s:textfield id="makevehicle" name="make" label="Make" /></td>
                                        <td><s:textfield id="modelvehicle" name="model" label="Model" /></td>
                                    </tr>
                                </s:iterator>
                            </table>
                        </fieldset>
                    </s:if>
                    <s:else>
                        <fieldset id="divvehicles">
                            <legend>
                                <h3>Vehicles Owned</h3>
                            </legend>
                            <table border="0" id="tblvehicle" width="100%">
                                <tr>
                                    <td><s:label>No. Of Units</s:label></td>
                                    <td><s:textfield id="noofunitsvehicle" name="noofunitsvehicle" label="No. Of Units" cssStyle="width: 30px;" /></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td><s:label>Type</s:label></td>
                                    <td><s:label>Make</s:label></td>
                                    <td><s:label>Model</s:label></td>
                                    </tr>
                                    <tr id="tobeclonedvehicle">
                                        <td>1</td>
                                        <td><s:textfield id="typevehicle" name="vtype" label="Type" /></td>
                                    <td><s:textfield id="makevehicle" name="make" label="Make" /></td>
                                    <td><s:textfield id="modelvehicle" name="model" label="Model" /></td>
                                </tr>
                            </table>
                        </fieldset>
                    </s:else>

                    <p><input type="button" id="btnvehicle" value="Add More" /></p>


                    <s:if test="%{#gp.other != null}">
                        <fieldset id="divosi">
                            <legend>
                                <h3>Other Sources of Income</h3>
                            </legend>
                            <table border="0" id="tblother" width="100%">
                                <tr>
                                    <td></td>
                                    <td></td>
                                    <td><s:label>Employer/Business Name</s:label></td>
                                    <td><s:label>Address</s:label></td>
                                    <td><s:label>Position</s:label></td>
                                    <td><s:label>Income</s:label></td>
                                    </tr>
                                <s:iterator value="%{#gp.other}" status="stat">
                                    <tr id="tobeclonedother">
                                        <td><label><s:property value="#stat.count" /></label></td>
                                        <td>
                                            <s:set name="ost" value="type" var="ost" />
                                            <s:select
                                                key="othersourceofincome.type"
                                                label="Type"
                                                id="type"
                                                name="othersrctype"
                                                list="{'Applicant','Spouse','Family'}"
                                                headerKey="-1"
                                                headerValue="Please Select"
                                                emptyOption="false"
                                                value="%{#ost}" /></td>
                                        <td><s:textfield id="empbusname" name="employer" label="Employer/Business Name" key="othersourceofincome.employer" /></td>
                                        <td><s:textfield id="otheraddress" name="address" label="Address" key="othersourceofincome.address" /></td>
                                        <td><s:textfield id="otherposition" name="position" label="Position" key="othersourceofincome.position" /></td>
                                        <td><s:textfield id="otherincome" name="income" label="Income" key="othersourceofincome.income" /></td>
                                    </tr>
                                </s:iterator>
                            </table>
                        </fieldset>
                    </s:if>
                    <s:else>
                        <fieldset id="divosi">
                            <legend>
                                <h3>Other Sources of Income</h3>
                            </legend>
                            <table border="0" id="tblother" width="100%">
                                <tr>
                                    <td></td>
                                    <td></td>
                                    <td><s:label>Employer/Business Name</s:label></td>
                                    <td><s:label>Address</s:label></td>
                                    <td><s:label>Position</s:label></td>
                                    <td><s:label>Income</s:label></td>
                                    </tr>
                                    <tr id="tobeclonedother">
                                        <td><label>1</label></td>
                                        <td>
                                        <s:select
                                            key="othersourceofincome.type"
                                            label="Type"
                                            id="othersrctype"
                                            name="type"
                                            list="{'Applicant','Spouse','Family'}"
                                            headerKey="-1"
                                            headerValue="Please Select"
                                            emptyOption="false"
                                            value="" /></td>
                                    <td><s:textfield id="empbusname" name="employer" label="Employer/Business Name" key="othersourceofincome.employer" /></td>
                                    <td><s:textfield id="otheraddress" name="address" label="Address" key="othersourceofincome.address" /></td>
                                    <td><s:textfield id="otherposition" name="position" label="Position" key="othersourceofincome.position" /></td>
                                    <td><s:textfield id="otherincome" name="income" label="Income" key="othersourceofincome.income" /></td>
                                </tr>
                            </table>
                        </fieldset>
                    </s:else>

                    <p><input type="button" id="btnother" value="Add More" /></p>
                    <fieldset id="diveduc">
                        <legend>
                            <h3>Educational Attainment</h3>
                        </legend>
                        <table border="0" width="100%">
                            <tr>
                                <td><td>
                                <td>Degree</td>
                                <td>School</td>
                                <td>Year Graduated</td>
                            </tr>
                            <tr>
                                <td>Applicant<td>
                                <td<s:textfield id="appdegree" value="%{#gp.borinfo.degree}" name="degree" label="Degree" key="borrowerinfo.degree"  cssStyle="width: 250px" /></td>
                                <td><s:textfield id="appschool" value="%{#gp.borinfo.school}" name="school" label="School" key="borrowerinfo.school"  cssStyle="width: 250px" /></td>
                                <td><s:textfield id="appyeargrad" value="%{#gp.borinfo.yeargraduated}" name="yeargraduated" label="Year Graduated" key="borrowerinfo.yeargraduated" /></td>
                            </tr>
                            <tr>
                                <td>Spouse</td>
                                <td><s:textfield id="spousedegree" name="spousedegree" label="Degree" value="%{#gp.creditinv.spousedegree}" key="creditinvestigations.spousedegree"  cssStyle="width: 250px" /></td>
                                <td><s:textfield id="spouseschool" name="spouseschool" label="School" value="%{#gp.creditinv.spouseschool}" key="creditinvestigations.spouseschool"  cssStyle="width: 250px" /></td>
                                <td><s:textfield id="spouseyeargrad" name="spouseyeargraduated" label="Year Graduated" value="%{#gp.creditinv.spouseyeargraduated}" key="creditinvestigations.spouseyeargraduated" /></td>
                            </tr>
                        </table>
                    </fieldset>
                    <fieldset>
                        <legend id="divprev">
                            <h3>Previous Home Address</h3>
                        </legend>
                        <table border="0" width="100%">
                            <tr>
                                <td><s:label>Street Address</s:label></td>
                                <td><s:label>Barangay</s:label><%-- --%></td>
                                <td><s:label>Municipality/City</s:label><%-- --%></td>
                                <td><s:label>Province</s:label><%-- --%></td>
                                <td><s:label>Postal Code</s:label><%-- --%></td>

                                </tr>
                                <tr>
                                    <td>
                                    <s:textfield id="prevaddstreet" value="%{#gp.creditinv.previousstreetaddress}" name="previousstreetaddress" label="Street Address" key="creditinvestigations.previousstreetaddress" />
                                </td>
                                <td>
                                    <s:textfield id="prevaddbrgy" value="%{#gp.creditinv.previousbarangay}" name="previousbarangay" label="Barangay" key="creditinvestigations.previousbarangay" />
                                </td>
                                <td>
                                    <s:textfield id="prevaddcitymuni" value="%{#gp.creditinv.previouscityormunicipality}" name="previouscityormunicipality" label="City/Municipality" key="creditinvestigations.previouscityormunicipality" />
                                </td>
                                <td>
                                    <s:textfield id="prevaddprovince" value="%{#gp.creditinv.previousprovince}" name="previousprovince" label="Province" key="creditinvestigations.previousprovince" />
                                </td>
                                <td>
                                    <s:textfield id="prevaddpostalcode" value="%{#gp.creditinv.previouspostalcode}" name="previouspostalcode" label="Postal Code" key="creditinvestigations.previouspostalcode"/>
                                </td>

                            </tr>
                            <tr>
                                <td><s:label>Years of Stay</s:label><%-- --%>
                                    <s:select
                                        cssStyle="width: 40px;"
                                        key="creditinvestigations.previouslengthofstayinyears"
                                        label="years"
                                        id="previouslengthofstayinyears"
                                        name="previouslengthofstayinyears"
                                        list="{'0','1','2','3','4','5','6','7','8','9','10'}"
                                        headerKey="-1"
                                        headerValue="Please Select"
                                        emptyOption="false"
                                        value="%{#gp.creditinv.previouslengthofstayinyears}"
                                        />

                                <td><s:label>Months of Stay</s:label><%-- --%>
                                    <s:select
                                        cssStyle="width: 40px;"
                                        name="previouslengthofstayinmonths"
                                        label="Months"
                                        key="creditinvestigations.previouslengthofstayinmonths"
                                        list="{'1','2','3','4','5','6','7','8','9','10','11','12'}"
                                        headerKey="-1"
                                        headerValue="Please Select"
                                        emptyOption="false"
                                        value="%{#gp.creditinv.previouslengthofstayinmonths}"
                                        />
                                </td>
                            </tr>


                        </table>
                    </fieldset>
                    <fieldset id="divparent">
                        <legend>
                            <h3>Parents Address</h3>
                        </legend>
                        <table border="0" width="100%">
                            <tr>
                                <td><s:label>Street Address</s:label></td>
                                <td><s:label>Barangay</s:label><%-- --%></td>
                                <td><s:label>Municipality/City</s:label><%-- --%></td>
                                <td><s:label>Province</s:label><%-- --%></td>
                                <td><s:label>Postal Code</s:label><%-- --%></td>
                                </tr>
                                <tr>
                                    <td>
                                    <s:textfield id="parentaddstreet" value="%{#gp.creditinv.parentsstreetaddress}" name="parentsstreetaddress" label="Street Address" key="creditinvestigations.parentsstreetaddress" />
                                </td>
                                <td>
                                    <s:textfield id="parentaddbrgy" value="%{#gp.creditinv.parentsbarangay}" name="parentsbarangay" label="Barangay" key="creditinvestigations.parentsbarangay" />
                                </td>
                                <td>
                                    <s:textfield id="parentaddcitymuni" value="%{#gp.creditinv.parentscityormunicipality}" name="parentscityormunicipality" label="City/Municipality" key="creditinvestigations.parentscityormunicipality" />
                                </td>
                                <td>
                                    <s:textfield id="parentaddprovince" value="%{#gp.creditinv.parentsprovince}" name="parentsprovince" label="Province" key="creditinvestigations.parentsprovince" />
                                </td>
                                <td>
                                    <s:textfield id="parentpostalcode" value="%{#gp.creditinv.parentspostalcode}" name="parentspostalcode" label="Postal Code" key="creditinvestigations.parentspostalcode"/>
                                </td>

                            </tr>
                            <tr>
                                <td><s:label>Years of Stay</s:label><%-- --%>
                                    <s:select
                                        cssStyle="width: 40px;"
                                        name="parentslengthofstayinyear"
                                        label="Years"
                                        key="creditinvestigations.parentslengthofstayinyear"
                                        list="{'0','1','2','3','4','5','6','7','8','9','10'}"
                                        headerKey="-1"
                                        headerValue="Please Select"
                                        emptyOption="false"
                                        value="%{#gp.creditinv.parentslengthofstayinyear}"
                                        />
                                </td>
                                <td><s:label>Months of Stay</s:label><%-- --%>
                                    <s:select
                                        cssStyle="width: 40px;"
                                        name="parentslengthofstayinmonths"
                                        label="Months"
                                        key="creditinvestigations.parentslengthofstayinmonths"
                                        list="{'1','2','3','4','5','6','7','8','9','10','11','12'}"
                                        headerKey="-1"
                                        headerValue="Please Select"
                                        emptyOption="false"
                                        value="%{#gp.creditinv.parentslengthofstayinmonths}"
                                        />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                    <fieldset>
                        <legend>
                            <h3>Parents' Information</h3>
                        </legend>
                        <table border="0" width="100%">
                            <tr>
                                <td></td>
                                <td><s:label>First Name</s:label></td>
                                <td><s:label>Middle Name</s:label></td>
                                <td><s:label>Last Name</s:label></td>
                                <td><s:label>Employer</s:label></td>
                                <td><s:label>Position</s:label></td>
                                <td><s:label>Age</s:label></td>
                                </tr>
                                <tr>
                                    <td><s:label>Father</s:label></td>
                                <td><s:textfield id="fatherlastname" value="%{#gp.borinfo.fatherfirstname}"  name="fatherfirstname" label="First Name" key="borrowerinfo.fatherfirstname" /><%-- --%></td>
                                <td><s:textfield id="fathermi" value="%{#gp.borinfo.fathermiddlename}"  name="fathermiddlename" label="Middle Name" key="borrowerinfo.fathermiddlename" /><%-- --%></td>
                                <td><s:textfield id="fatherfirstname" value="%{#gp.borinfo.fatherlastname}" name="fatherlastname" label="Last Name" key="borrowerinfo.fatherlastname" /><%-- --%></td>
                                <td><s:textfield id="fatheremp" value="%{#gp.borinfo.fatheremployer}" name="fatheremployer" label="Employer" key="borrowerinfo.fatheremployer" /><%-- --%></td>
                                <td><s:textfield id="fatherposition" value="%{#gp.borinfo.fatherposition}" name="fatherposition" label="Position" key="borrowerinfo.fatherposition" /><%-- --%></td>
                                <td><s:textfield id="fatherage" value="%{#gp.borinfo.fatherage}" name="fatherage" label="Age" key="borrowerinfo.fatherage" cssStyle="width: 30px;" /></td>
                            </tr>
                            <tr>
                                <td><s:label>Mother</s:label></td>
                                <td><s:textfield id="motherfirstname" value="%{#gp.borinfo.motherfirstname}"  name="motherfirstname" label="First Name" key="borrowerinfo.motherfirstname" /><%-- --%></td>
                                <td><s:textfield id="mothermi" value="%{#gp.borinfo.mothermiddlename}"  name="mothermiddlename" label="Middle Name" key="borrowerinfo.mothermiddlename" /><%-- --%></td>
                                <td><s:textfield id="motherlastname" value="%{#gp.borinfo.motherlastname}"  name="motherlastname" label="Last Name" key="borrowerinfo.motherlastname" /><%-- --%></td>
                                <td><s:textfield id="motheremp" value="%{#gp.borinfo.motheremployer}"  name="motheremployer" label="Employer" key="borrowerinfo.motheremployer" /><%-- --%></td>
                                <td><s:textfield id="motherposition" value="%{#gp.borinfo.motherposition}"  name="motherposition" label="Position" key="borrowerinfo.motherposition" /><%-- --%></td>
                                <td><s:textfield id="motherage" value="%{#gp.borinfo.motherage}"  name="motherage" label="Age" key="borrowerinfo.motherage" cssStyle="width: 30px;" /></td>
                            </tr>
                        </table>
                    </fieldset>
                    <fieldset id="divinlaw">
                        <legend>
                            <h3>Parents-in-Law's Address</h3>
                        </legend>
                        <table border="0" width="100%">
                            <tr>
                                <td><s:label>Street Address</s:label></td>
                                <td><s:label>Barangay</s:label><%-- --%></td>
                                <td><s:label>Municipality/City</s:label><%-- --%></td>
                                <td><s:label>Province</s:label><%-- --%></td>
                                <td><s:label>Postal Code</s:label><%-- --%></td>
                                </tr>
                                <tr>
                                    <td>
                                    <s:textfield id="parentinlawaddno" value="%{#gp.creditinv.parentsinlawstreetaddress}" name="parentsinlawstreetaddress" label="Street Address" key="creditinvestigations.parentsinlawstreetaddress" />
                                </td>
                                <td>
                                    <s:textfield id="parentinlawaddbrgy" value="%{#gp.creditinv.parentsinlawbarangay}" name="parentsinlawbarangay" label="Barangay" key="creditinvestigations.parentsinlawbarangay" />
                                </td>
                                <td>
                                    <s:textfield id="parentinlawaddcitymuni" value="%{#gp.creditinv.parentsinlawcityormunicipality}" name="parentsinlawcityormunicipality" label="City/Municipality" key="creditinvestigations.parentsinlawcityormunicipality" />
                                </td>
                                <td>
                                    <s:textfield id="parentinlawaddprovince" value="%{#gp.creditinv.parentsinlawprovince}" name="parentsinlawprovince" label="Province" key="creditinvestigations.parentsinlawprovince" />
                                </td>
                                <td>
                                    <s:textfield id="parentinlawaddprovince" value="%{#gp.creditinv.parentsinlawpostalcode}" name="parentsinlawpostalcode" label="Postal Code" key="creditinvestigations.parentsinlawpostalcode" />
                                </td>

                            </tr>
                            <tr>
                                <td><s:label>Years of Stay</s:label><%-- --%>
                                    <s:select
                                        cssStyle="width: 40px;"
                                        name="parentsinlawlengthofstayinyears"
                                        label="Years"
                                        list="{'0','1','2','3','4','5','6','7','8','9','10'}"
                                        headerKey="-1"
                                        headerValue="Please Select "
                                        emptyOption="false"
                                        value="%{#gp.creditinv.parentsinlawlengthofstayinyears}"
                                        />
                                </td>
                                <td><s:label>Months of Stay</s:label><%-- --%>
                                    <s:select
                                        cssStyle="width: 40px;"
                                        name="parentsinlawlengthofstayinmonths"
                                        label="Months"
                                        list="{'1','2','3','4','5','6','7','8','9','10','11','12'}"
                                        headerKey="-1"
                                        headerValue="Please Select"
                                        emptyOption="false"
                                        value="%{#gp.creditinv.parentsinlawlengthofstayinmonths}"
                                        />
                                </td>
                            </tr>

                        </table>
                    </fieldset>
                    <fieldset>
                        <legend>
                            <h3>Parents-in-Law's Information</h3>
                        </legend>
                        <table border="0" width="100%">
                            <tr>
                                <td></td>
                                <td><s:label>First Name</s:label></td>
                                <td><s:label>Middle Name</s:label></td>
                                <td><s:label>Last Name</s:label></td>
                                <td><s:label>Employer</s:label></td>
                                <td><s:label>Position</s:label></td>
                                <td><s:label>Age</s:label></td>
                                </tr>
                                <tr>
                                    <td><s:label>Father</s:label></td>
                                <td><s:textfield id="fatherinlawfirstname" value="%{#gp.creditinv.fatherinlawfirstname}" name="fatherinlawfirstname" label="First Name" key="creditinvestigations.fatherinlawfirstname" /></td>
                                <td><s:textfield id="fatherinlawmi" value="%{#gp.creditinv.fatherinlawmiddlename}" name="fatherinlawmiddlename" label="M.I." key="creditinvestigations.fatherinlawmiddlename" /></td>
                                <td><s:textfield id="fatherinlawlastname" value="%{#gp.creditinv.fatherinlawlastname}" name="fatherinlawlastname" label="Last Name" key="creditinvestigations.fatherinlawlastname" /></td>
                                <td><s:textfield id="fatherinlawemp" value="%{#gp.creditinv.fatherinlawemployer}" name="fatherinlawemployer" label="Employer" key="creditinvestigations.fatherinlawemployer" /></td>
                                <td><s:textfield id="fatherinlawposition" value="%{#gp.creditinv.fatherinlawposition}" name="fatherinlawposition" label="Position" key="creditinvestigations.fatherinlawposition" /></td>
                                <td><s:textfield id="fatherinlawage" value="%{#gp.creditinv.fatherinlawage}" name="fatherinlawage" label="Age" key="creditinvestigations.fatherinlawage" cssStyle="width: 30px;" /></td>
                            </tr>
                            <tr>
                                <td><s:label>Mother</s:label></td>
                                <td><s:textfield id="motherfirstname" value="%{#gp.creditinv.motherinlawfirstname}" name="motherinlawfirstname" label="First Name" key="creditinvestigations.motherinlawfirstname" /></td>
                                <td><s:textfield id="mothermi" value="%{#gp.creditinv.motherinlawmiddlename}" name="motherinlawmiddlename" label="M.I." key="creditinvestigations.motherinlawmiddlename" /></td>
                                <td><s:textfield id="motherlastname" value="%{#gp.creditinv.motherinlawlastname}" name="motherinlawlastname" label="Last Name" key="creditinvestigations.motherinlawlastname" /></td>
                                <td><s:textfield id="motheremp" value="%{#gp.creditinv.motherinlawemployer}" name="motherinlawemployer" label="Employer" key="creditinvestigations.motherinlawemployer" /></td>
                                <td><s:textfield id="motherposition" value="%{#gp.creditinv.motherinlawposition}" name="motherinlawposition" label="Position" key="creditinvestigations.motherinlawposition" /></td>
                                <td><s:textfield id="motherage" value="%{#gp.creditinv.motherinlawage}" name="motherinlawage" label="Age" key="creditinvestigations.motherinlawage" cssStyle="width: 30px;" /></td>
                            </tr>
                        </table>
                    </fieldset>
                    <s:if test="%{#gp.parp != null}">
                        <fieldset id="divprp">
                            <legend>
                                <h3>Personal and Real Properties Owned</h3>
                            </legend>
                            <table border="0" id="tblpersonal" width="100%">
                                <tr>
                                    <td colspan="6" style="font-size: 14px; font-weight: bold;"><s:label>Personal and Real Properties Owned</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="6" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td>Description</td>
                                        <td>Nature</td>
                                        <td>Location</td>
                                        <td>Value</td>
                                    </tr>
                                <s:iterator value="%{#gp.parp}" status="stat" >
                                    <tr id="tobeclonedpersonal">
                                        <td><label><s:property value="#stat.count"/></label></td>
                                        <td><s:textfield id="prpdescription" name="description" label="Description" key="personalandrealproperties.description" /></td>
                                        <td><s:textfield id="prpnature" name="nature" label="Nature" key="personalandrealproperties.nature"/></td>
                                        <td><s:textfield id="prplocation" name="location" label="Location" key="personalandrealproperties.location"/></td>
                                        <td><s:textfield id="value6" name="value" label="Value" key="personalandrealproperties.value"/></td>
                                    </tr>
                                </s:iterator>
                            </table>
                        </fieldset>
                    </s:if>
                    <s:else>
                        <fieldset id="divprp">
                            <legend>
                                <h3>Personal and Real Properties Owned</h3>
                            </legend>
                            <table border="0" id="tblpersonal" width="100%">
                                <tr>
                                    <td></td>
                                    <td>Description</td>
                                    <td>Nature</td>
                                    <td>Location</td>
                                    <td>Value</td>
                                </tr>
                                <tr id="tobeclonedpersonal">
                                    <td>1</td>
                                    <td><s:textfield id="prpdescription" name="description" label="Description" key="personalandrealproperties.description" /></td>
                                    <td><s:textfield id="prpnature" name="nature" label="Nature" key="personalandrealproperties.nature"/></td>
                                    <td><s:textfield id="prplocation" name="location" label="Location" key="personalandrealproperties.location"/></td>
                                    <td><s:textfield id="value6" name="value" label="Value" key="personalandrealproperties.value"/></td>
                                </tr>
                            </table>
                        </fieldset>
                    </s:else>
                    <p><input type="button" id="btnpersonal" value="Add More" /></p>
                        <s:if test="%{#gp.notes != null}">
                        <fieldset id="divonr">
                            <legend>
                                <h3>Savings, Time Deposit and Other Notes Receivables</h3>
                            </legend>
                            <table border="0" id="tblsavings" width="100%">
                                <tr>
                                    <td colspan="6" style="font-size: 14px; font-weight: bold;"><s:label>Savings, Time Deposit and Other Notes Receivables</s:label></td>
                                    </tr>
                                    <tr>
                                        <td colspan="6" style="font-size: 14px; font-weight: bold;"><hr /></td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td>Bank/Institution</td>
                                        <td>Type</td>
                                        <td>Account Number</td>
                                        <td>Amount</td>
                                    </tr>
                                <s:iterator value="%{#gp.notes}" status="stat">
                                    <tr id="tobeclonedsavings">
                                        <td><label><s:property value="#stat.count" /></label></td>
                                        <td><s:textfield id="stobankinstitution" name="bank" label="Bank/Institution" key="notesreceivable.bank" /></td>
                                        <td><input id="stotype" name="stotype" value="<s:property value="type"/>" label="Type" key="notesreceivable.type" /></td>
                                        <td><s:textfield id="stoaccountno" name="accountno" label="Account Number" key="notesreceivable.accountno" /></td>
                                        <td> <s:textfield id="stoamount" name="amount" label="Amount" key="notesreceivable.amount" /></td>
                                    </tr>
                                </s:iterator>
                            </table>
                        </fieldset>
                    </s:if>
                    <s:else>
                        <fieldset id="divonr">
                            <legend>
                                <h3>Savings, Time Deposit and Other Notes Receivables</h3>
                            </legend>
                            <table border="0" id="tblsavings" width="100%">
                                <tr>
                                    <td></td>
                                    <td>Bank/Institution</td>
                                    <td>Type</td>
                                    <td>Account Number</td>
                                    <td>Amount</td>
                                </tr>
                                <tr id="tobeclonedsavings">
                                    <td>1</td>
                                    <td><s:textfield id="stobankinstitution" name="bank" label="Bank/Institution" key="notesreceivable.bank" /></td>
                                    <td><s:textfield id="stotype" name="stotype" label="Type" key="notesreceivable.type" /></td>
                                    <td><s:textfield id="stoaccountno" name="accountno" label="Account Number" key="notesreceivable.accountno" /></td>
                                    <td> <s:textfield id="stoamount" name="amount" label="Amount" key="notesreceivable.amount" /></td>
                                </tr>
                            </table>
                        </fieldset>
                    </s:else>
                    <p><input type="button" id="btnsavings" value="Add More" /></p>
                    <fieldset id="divrep">
                        <legend>
                            <h3>Reputation</h3>
                        </legend>
                        <table border="0" width="100%">
                            <tr>
                                <td colspan="6" style="font-size: 14px; font-weight: bold;"><s:label>Reputation</s:label></td>
                                    <td>
                                        <div class="inputContainer">
                                        <s:checkbox cssClass="validate[minCheckbox[2]] checkbox" label="Good moral character" name="reputation" value="false" fieldValue="Good moral character" key="reputation.type" /><s:label>Good moral character</s:label><br />
                                        <s:checkbox cssClass="validate[minCheckbox[2]] checkbox" label="Notorious character" name="reputation" value="false" fieldValue="Notorious character" key="reputation.type"/><s:label>Notorious character</s:label><br />
                                        <s:checkbox cssClass="validate[minCheckbox[2]] checkbox" label="Heavily indebted" name="reputation" value="false" fieldValue="Heavily indebted" key="reputation.type"/><s:label>Heavily indebted</s:label><br />
                                        <s:checkbox cssClass="validate[minCheckbox[2]] checkbox" label="Frequented by collectors" name="reputation" value="false" fieldValue="Frequented by collectors" key="reputation.type"/><s:label>Frequented by collectors</s:label><br />
                                        <s:checkbox cssClass="validate[minCheckbox[2]] checkbox" label="Extravagant" name="reputation" value="false" fieldValue="Extravagant" key="reputation.type"/><s:label>Extravagant</s:label><br />
                                        <s:checkbox cssClass="validate[minCheckbox[2]] checkbox" label="Gambler" name="reputation" value="false" fieldValue="Gambler" key="reputation.type"/><s:label>Gambler</s:label><br />
                                        <s:checkbox cssClass="validate[minCheckbox[2]] checkbox" label="Adulterous" name="reputation" value="false" fieldValue="Adulterous" key="reputation.type"/><s:label>Adulterous</s:label><br />
                                        <s:checkbox cssClass="validate[minCheckbox[2]] checkbox" label="Separated" name="reputation" value="false" fieldValue="Separated" key="reputation.type"/><s:label>Separated</s:label>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="6" style="font-size: 14px; font-weight: bold;"><s:label>Residence Confirmation</s:label></td>
                                    <td>
                                    <s:label>Residence Confirmation</s:label>
                                        <div class="inputContainer">
                                        <s:select
                                            cssClass="validate[required]"
                                            label="Residence Confirmation"
                                            id="rescon"
                                            name="presentaddressstatus"
                                            list="{'Owned','Mortgage','Living w/ Parents','Free'}"
                                            headerKey="-1"
                                            headerValue="Please Select"
                                            emptyOption="false"
                                            value="%{#gp.creditinv.presentaddressstatus}" />
                                    </div>
                                    <br />
                                    <s:label>Length of Stay</s:label>
                                    <s:select
                                        cssClass="validate[required]"
                                        cssStyle="width: 40px;"
                                        label="Years"
                                        name="presentaddresslengthofstayinyears"
                                        list="{'0','1','2','3','4','5','6','7','8','9','10'}"
                                        headerKey="-1"
                                        headerValue="Please Select"
                                        emptyOption="false"
                                        value="%{#gp.creditinv.presentaddresslengthofstayinyears}"
                                        />
                                    <s:label>Months of Stay</s:label>
                                        <div class="inputContainer">
                                        <s:select
                                            cssClass="validate[required]"
                                            cssStyle="width: 40px;"
                                            name="presentaddresslengthofstayinmonths"
                                            label="Months"
                                            list="{'1','2','3','4','5','6','7','8','9','10','11','12'}"
                                            headerKey="-1"
                                            headerValue="Please Select"
                                            emptyOption="false"
                                            value="%{#gp.creditinv.presentaddresslengthofstayinmonths}"
                                            />
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="6" style="font-size: 14px; font-weight: bold;"><s:label>Source of Income</s:label></td>
                                    <td>
                                    <s:checkbox label="Employment" name="sourceofincome" value="false" fieldValue="Employment" key="sourceofincome.type"/><s:label>Employment</s:label><br />
                                    <s:checkbox label="Business" name="sourceofincome" value="false" fieldValue="Business" key="sourceofincome.type"/><s:label>Business</s:label><br />
                                    <s:checkbox label="Overseas Remittance" name="sourceofincome" value="false" fieldValue="Overseas Remittance" key="sourceofincome.type"/><s:label>Overseas Remittance</s:label><br />
                                    <s:checkbox label="Pension" name="sourceofincome" value="false" fieldValue="Pension" key="sourceofincome.type"/><s:label>Pension</s:label>
                                    </td>
                                </tr>
                            </table>
                        </fieldset>
                    <s:set name="infnotempty" value="infnotempty"/>
                    <s:if test="%{#gp.inf != null}">
                        <fieldset id="divinf">
                            <legend>
                                <h3>Informants</h3>
                            </legend>
                            <table border="0" id="tblinformants" width="100%">
                                <tr>
                                    <td></td>
                                    <td>First Name</td>
                                    <td>Middle Name</td>
                                    <td>Last Name</td>
                                    <td>Relationship to Borrower</td>
                                    <td>Address</td>
                                    <td>Length of Relationship</td>
                                </tr>
                                <s:iterator value="%{#gp.inf}" status="stat">
                                    <tr id="tobeclonedinformants">
                                        <td><label><s:property value="#stat.count" /></label></td>
                                        <td><input id="informant1firstname" value="<s:property value="firstname"/>" name="ifirstname" label="First Name" key="informants.firstname" /></td>
                                        <td><input id="informant1mi" value="<s:property value="middlename"/>" name="imiddlename" label="M.I." key="informants.middlename" /></td>
                                        <td><input id="informant1lastname" value="<s:property value="lastname"/>" name="ilastname" label="Last Name" key="informants.lastname" /></td>
                                        <td><input id="informant1rel" value="<s:property value="relationshiptoborrower"/>" name="irelationshiptoborrower" label="Relationship to Borrower"  key="informants.relationshiptoborrower" /></td>
                                        <td><input id="informant1address"  value="<s:property value="address"/>" name="iaddress" label="Address" key="informants.address" /></td>
                                        <td><input id="lengthofrelationshipinyears3"  value="<s:property value="lengthofrelationshipinyears"/>" name="ilengthofrelationshipinyears" label="Length of Relationship" key="informants.lengthofrelationshipinyears" /></td>
                                    </tr>
                                </s:iterator> 
                            </table>
                        </fieldset>
                    </s:if>
                    <s:else>
                        <fieldset id="divinf">
                            <legend>
                                <h3>Informants</h3>
                            </legend>
                            <table border="0" id="tblinformants" width="100%">
                                <tr>
                                    <td></td>
                                    <td>First Name</td>
                                    <td>Middle Name</td>
                                    <td>Last Name</td>
                                    <td>Relationship to Borrower</td>
                                    <td>Address</td>
                                    <td>Length of Relationship</td>
                                </tr>
                                <tr id="tobeclonedinformants">
                                    <td>1</td>
                                    <td><s:textfield id="informant1firstname" name="ifirstname" label="First Name" key="informants.firstname" /></td>
                                    <td><s:textfield id="informant1mi" name="imiddlename" label="M.I." key="informants.middlename" /></td>
                                    <td><s:textfield id="informant1lastname" name="ilastname" label="Last Name" key="informants.lastname" /></td>
                                    <td><s:textfield id="informant1rel" name="irelationshiptoborrower" label="Relationship to Borrower"  key="informants.relationshiptoborrower" /></td>
                                    <td><s:textfield id="informant1address" name="iaddress" label="Address" key="informants.address" /></td>
                                    <td><s:textfield id="lengthofrelationshipinyears3" name="ilengthofrelationshipinyears" label="Length of Relationship" key="informants.lengthofrelationshipinyears" /></td>
                                </tr>
                            </table>
                        </fieldset>
                    </s:else>
                    <p><input type="button" id="btninformants" value="Add More" /></p>

                    <s:if test="%{#gp.doc != null}">
                        <fieldset id="divdocs">
                            <legend>
                                <h3>Documents Presented</h3>
                            </legend>
                            <table border="0" id="tbldocs" width="100%">
                                <!--                    <tr>-->
                                <!--                        <td></td>-->
                                <!--                    </tr>-->
                                <tr>
                                    <td></td>
                                    <td><s:label>Documents Type</s:label></td>
                                    <td><s:label>Documents No.</s:label></td>
                                    <td><s:label>Type of Copy</s:label></td>
                                    </tr>
                                <s:iterator value="%{#gp.doc}" status="stat" >
                                    <tr id="tobecloneddocs">
                                        <td><label><s:property value="#stat.count"/></label></td>
                                        <td><s:textfield id="documenttype" name="documenttype" label="Document Type" key="documentspassed.documenttype" /></td>
                                        <td><s:textfield id="documentno" name="documentno" label="Document No." key="documentpassed.documentno" /></td>
                                        <td>
                                            <s:select
                                                id="documenttypecopy"
                                                name="copytype"
                                                key="documentspassed.copytype"
                                                label="Months"
                                                list="{'Original','Photocopy'}"
                                                headerKey="-1"
                                                headerValue="Please Select"
                                                emptyOption="false"
                                                value="1" />
                                        </td>
                                    </tr>
                                </s:iterator>
                            </table>
                        </fieldset>
                    </s:if>
                    <s:else>
                        <fieldset id="divdocs">
                            <legend>
                                <h3>Documents Presented</h3>
                            </legend>
                            <table border="0" id="tbldocs" width="100%">
                                <tr>
                                    <td></td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td><s:label>Documents Type</s:label></td>
                                    <td><s:label>Documents No.</s:label></td>
                                    <td><s:label>Type of Copy</s:label></td>
                                    </tr>
                                    <tr id="tobecloneddocs">
                                        <td>1</td>
                                        <td><s:textfield id="documenttype" name="documenttype" label="Document Type" key="documentspassed.documenttype" /></td>
                                    <td><s:textfield id="documentno" name="documentno" label="Document No." key="documentpassed.documentno" /></td>
                                    <td>
                                        <s:select
                                            id="documenttypecopy"
                                            name="copytype"
                                            key="documentspassed.copytype"
                                            label="Months"
                                            list="{'Original','Photocopy'}"
                                            headerKey="-1"
                                            headerValue="Please Select"
                                            emptyOption="false"
                                            value="1" />
                                    </td>
                                </tr>
                            </table>
                        </fieldset>
                    </s:else>

                    <p><input type="button" id="btndocs" value="Add More" /></p>
                    <fieldset id="divosa">
                        <legend>
                            <h3>Observations and Situational Analysis</h3>
                        </legend>
                        <table border="0" width="100%">
                            <tr>
                                <td>
                                    <s:label>Stocks Worth Description</s:label><br/>
                                    <s:textarea cols="45" rows="10" id="stocksworth" name="stocksworth" value="%{#gp.creditinv.stocksworthdescription}" label="Stocks Worth"/><br/>
                                    <s:label>Stocks Worth Amount</s:label><br/>
                                    <s:textfield name="stocksworthamount" id ="stocksworthamount" value="%{#gp.creditinv.stocksworthamount}" label="Amount" />
                                </td>
                                <td>
                                    <s:label>Remarks</s:label><br/>
                                    <s:textarea cols="45" rows="10" id="osaremarks" name="remarks" label="Remarks" value="%{#gp.creditinv.remarks}" /><br/>
                                    <s:textfield name="asdfasd" cssStyle="visibility: hidden;" />
                                </td>
                                <td>
                                    <s:label>Types of Collaterals</s:label><br/>
                                    <s:checkbox label="Appliance" name="collateral" value="false" fieldValue="Appliance"/><s:label>Appliance</s:label><br />
                                    <s:checkbox label="Motor Vehicle" name="collateral" value="false" fieldValue="Motor Vehicle"/><s:label>Motor Vehicle</s:label><br />
                                    <s:checkbox label="Passenger Tricycle" name="collateral" value="false" fieldValue="Passenger Tricycle"/><s:label>Passenger Tricycle</s:label><br />
                                    <s:checkbox label="House and Lot" name="collateral" value="false" fieldValue="House and Lot"/><s:label>House and Lot</s:label><br />
                                    <s:checkbox label="Land Title" name="collateral" value="false" fieldValue="Land Title"/><s:label>Land Title</s:label><br />
                                    <s:label>Others:</s:label><s:textfield id="othertypecollateral" name="othertypecollateral" label="Others:" />
                                    </td>
                                </tr>
                            </table>
                        </fieldset>
                        <fieldset id="diveval">
                            <legend>
                                <h3>Evaluation and Recommendations</h3>
                            </legend>
                            <table border="0" width="100%">
                                <tr>
                                    <td>
                                    <s:label>Credit Consultant</s:label><br/>
                                    <s:textarea cols="45" rows="10" id="ercreditcon" name="creditconsultantrecommendation" value="%{#gp.creditinv.creditconsultantrecommendation}" label="Credit Consultant"/>
                                </td>

                                <td>
                                    <s:label>Branch Manager</s:label><br/>
                                    <s:textarea cols="45" rows="10" id="erbm" name="branchmanagerrecommendation" label="Branch Manager" value="%{#gp.creditinv.branchmanagerrecommendation}" />
                                </td>

                                <td>
                                    <s:label>Area Manager</s:label><br/>
                                    <s:textarea cols="45" rows="10" id="eram" name="areamanagerrecommendation" label="Area Manager" value="%{#gp.creditinv.areamanagerrecommendation}" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </s:div>
                <s:div id="buttons" cssStyle="float:right">
                    <%--<s:if test="%{#privilege1e.allowable == true}">--%>
                    <s:if test="%{#gp.creditinv.stat == 'saved'}">
                        <sj:a
                            name="postCI"
                            id="postCI"
                            onclick="postCI()"
                            button="true"
                            >
                            Post to Head Office
                        </sj:a>
                        <%--<sj:submit cssClass="ui-state-default" value="Post Credit Investigation" button="true" cssStyle="float:left;margin-top:2px;font-size:12px !important;font-family: Tahoma, Geneva, sans-serif !important;" />--%>
                    </s:if>
                    <s:else>
                        <h4>This credit investigation was already posted.</h4>
                        <%--<sj:submit cssClass="ui-state-default" disabled="true" value="Post Credit Investigation" button="true" cssStyle="float:left;margin-top:2px;font-size:12px !important;font-family: Tahoma, Geneva, sans-serif !important;" />--%>
                    </s:else>
                    <%--</s:if>
                    <s:else>
                        <s:if test="%{#gp.creditinv.stat == 'saved'}">
                            <h4>This credit investigation was already saved.</h4>
                            <sj:submit cssClass="ui-state-default" value="Post Loan Application" button="true" cssStyle="float:right;margin-top:2px;font-size:12px !important;font-family: Tahoma, Geneva, sans-serif !important;" />
                        </s:if>
                    </s:else>--%>
                </s:div>
            </s:if>
            <s:else>
                <s:div cssStyle="width: 200px; margin-left: auto; margin-right: auto">
                    <h3> No credit investigation yet.</h3>
                    <p> Click <strong><em><a href="loanapplication.jsp?cat=credit">here</a></em></strong> to add now. </p>
                </s:div>
            </s:else>
        </s:form>
    </s:div>
</div>
<div id="appraisal">
    <s:div id="appraisal" cssStyle="padding: 0px;">
        <s:div cssStyle="width: 40%; position: fixed; top: 145px">
            <s:set name="stat" value="actionstatus2"/>
            <s:if test="%{#stat!=null}">
                <s:div>
                    <s:if test="%{#stat!='ok'}">
                        <dl class="ui-state-error ui-corner-all">
                            <dt><span class="ui-icon ui-icon-alert"></span><s:property value="#stat"/></dt>
                        </dl>
                    </s:if>
                    <s:elseif test="%{#stat=='ok'}">
                        <dl class="ui-state-hightlight ui-corner-all">
                            <dt><span class="ui-icon ui-icon-info"></span>Appraisal Saved.</dt>
                        </dl>
                    </s:elseif>  
                </s:div>
            </s:if>
            <s:set name="stat" value="message"/>
            <s:if test="%{#stat!=null}">
                <s:div>
                    <s:if test="%{#stat!='ok'}">
                        <dl class="ui-state-error ui-corner-all">
                            <dt><span class="ui-icon ui-icon-alert"></span><s:property value="#stat"/></dt>
                        </dl>
                    </s:if>
                </s:div>
            </s:if>
        </s:div>
        <s:form id="appraisalform" action="update-ap" theme="simple"  method="post" enctype="multipart/form-data">
            <s:if test="%{#gp.appraisal != null}">
                <s:div>
                    <fieldset>
                        <legend>
                            <h3>Document Information</h3>
                        </legend>
                        <table border="0" width="100%">
                            <tr>
                                <td style="display: none"><s:textfield name="apid" cssStyle="font-size: 11px; width: 100px" value="%{#gp.appraisal.appraisalid}" label="Document No."/></td>
                                <td>
                                    <s:label>Document</s:label>
                                    </td>
                                    <td>
                                    <s:label><s:textfield id="doctypeapp" name="doctypeapp" cssStyle="font-size: 11px; width: 100px" label="Document Type" readonly="true" value="Appraisal"/></s:label>
                                    </td>
                                    <td nowrap="true">
                                    <s:label>Document No.</s:label>
                                    </td>
                                    <td>
                                    <s:label><s:textfield id="docnoapp" name="docnoapp" cssStyle="font-size: 11px; width: 100px" label="Document No." value="%{#gp.appraisal.documents.documentno}" /></s:label>
                                    </td>
                                    <td>
                                    <s:label>Document Date</s:label>
                                    </td>
                                    <td>
                                    <s:label><div class="inputContainer"><sj:datepicker  id="documentdateapp" value="%{#gp.appraisal.documents.documentdate}" cssStyle="font-size: 11px; width: 100px" name="documentdateapp" label="Document Date" cssClass="validate[required]"/></div></s:label>
                                    </td>
                                    <td><s:label>Document Image</s:label></td><td><s:file name="userImage" label="User Image" cssStyle="font-size: 11px; width: 100px" /></td>
                                </tr>
                                <tr>
                                    <td><s:label>Document Ref</s:label></td><td><s:textfield readonly="true" id="docreftypeci" cssStyle="font-size: 11px; width: 100px;" name="docreftypeci" label="Document Ref Type" value="Loan Application" /></td>
                                <td><s:label>Document Ref No.</s:label></td><td><s:textfield readonly="true" id="docrefnoci" cssStyle="font-size: 11px; width: 100px" name="docrefnoci" value="%{#gp.loanver.documents.documentno}" label="Document Ref No." /></td>
                                <td><s:label>Document Ref Date</s:label></td><td><s:textfield name="docdate" cssStyle="font-size: 11px; width: 100px" label="Document Date" readonly="true" value="%{#gp.loanver.documents.documentdate}" /></td>
                                <td style="display: none"><s:label>Loan Verification ID</s:label></td><td style="display: none"><s:textfield name="loanverid" cssStyle="font-size: 11px; width: 100px" label="loanverid" readonly="true" value="%{#gp.loanver.loanverificationid}" /></td>
                                <td style="display: none"><s:label>Employee Id</s:label></td>
                                <td style="display: none"><s:textfield name="employeeid" value="%{#session['employee'].idnumber}" readonly="true" label="Employee Id"/></td>
                            </tr>
                            <tr>

                                <td style="display: none">
                                    <s:label>Borrower Code</s:label>
                                    </td>
                                    <td style="display: none">
                                    <s:label><s:textfield id="borrowercode" name="borrowercode" label="Borrower Code"/></s:label>
                                    </td>
                                    <td><s:label>Borrower's Full Name: </s:label></td>
                                <td><div class="inputContainer"><s:textfield cssStyle="font-size: 11px; width: 100px" id="nickname" name="nickname" label="Nickname" value="%{#gp.loaninfo.borrowername}" key="creditinvestigations.nickname" readonly="true" cssClass="validate[required] text-input" /></div></td>
                                <td style="display: none"">
                                    <s:label>Loan Application ID</s:label>
                                </td>
                                <td style="display: none">
                                <s:textfield id="loanappidapp" name="loanappidapp" cssStyle="font-size: 11px; width: 100px" label="loanappidapp No." value="%{#gp.loaninfo.loanappid}"/>
                            </td>

                            <td style="display: none"><s:textfield name="dateoffirstrelease" value="DATE" readonly="true" /></td>
                        </tr>

                    </table>
                </fieldset>
            </s:div>
            <s:div id="approverflow" cssStyle="height: 330px; overflow: auto">
                <%--<table border="0">
                    <tr>
                        <td><s:textfield id="borrowername" name="borrowername" label="borrowername" /></td>
                        <td></td>
                    </tr>
                </table>--%>
                <fieldset>
                    <legend>
                        <h3>Collaterals</h3>
                    </legend>
                    <table border="0">
                        <tr>
                            <td colspan="9" style="font-size: 14px; font-weight: bold;"><hr /></td>
                        </tr>
                        <tr id="trlabelapp">
                            <s:iterator value="%{#gp.colllist}" status="stat">
                                <td nowrap="true"></td>
                                <td align="center" id="tobeclonedapp"><s:label name="#stat.count" /></td>
                            </s:iterator>
                        </tr>
                        <tr id="trmakeandtype">
                            <s:iterator value="%{#gp.colllist}" status="stat">
                                <td nowrap="true"><s:label cssStyle="width: 400px">Make and Type</s:label></td>
                                <td id="tobeclonedmakeandtype"><div class="inputContainer"><s:textfield id="makeandtype" name="makeandtype" cssClass="validate[required]" label="Make & Type" /></div></td>
                            </s:iterator>
                        </tr>
                        <tr id="trbrand">
                            <s:iterator value="%{#gp.colllist}" status="stat">
                                <td><s:label cssStyle="width: 400px">Brand</s:label></td>
                                <td id="tobeclonedbrand"><div class="inputContainer"><s:textfield id="brand8" name="brand" label="Brand" cssClass="validate[required]" /></div></td>
                            </s:iterator>
                        </tr>
                        <tr id="trserial">
                            <s:iterator value="%{#gp.colllist}" status="stat">
                                <td><s:label cssStyle="width: 400px">Series Number</s:label></td>
                                <td id="tobeclonedserial"><s:textfield id="serialno" name="serialno" label="Serial Number" /></td>
                            </s:iterator>
                        </tr>
                        <tr id="trmodel">
                            <s:iterator value="%{#gp.colllist}" status="stat">
                                <td><s:label cssStyle="width: 400px" nowrap="true">Model Number</s:label></td>
                                <td id="tobeclonedmodel"><s:textfield id="modelno" name="modelno" label="Model Number" /></td>
                            </s:iterator>
                        </tr>
                        <tr id="trreg">
                            <s:iterator value="%{#gp.colllist}" status="stat">
                                <td><s:label cssStyle="width: 400px">Reg. Cert. No.</s:label></td>
                                <td id="tobeclonedreg"><s:textfield id="regcertno" name="regcertno" label="Reg. Cert. No." /></td>
                            </s:iterator>
                        </tr>
                        <tr id="trmotor">
                            <s:iterator value="%{#gp.colllist}" status="stat">
                                <td><s:label cssStyle="width: 400px">Motor No.</s:label></td>
                                <td id="tobeclonedmotor"> <s:textfield id="motorno" name="motorno" label="Motor No." /></td>
                            </s:iterator>
                        </tr>
                        <tr id="trchasis">
                            <s:iterator value="%{#gp.colllist}" status="stat">
                                <td><s:label cssStyle="width: 400px">Chassis No.</s:label></td>
                                <td id="tobeclonedchasis"><s:textfield id="chasisno" name="chasisno" label="Chassis No." /></td>
                            </s:iterator>
                        </tr>
                        <tr id="trplate">
                            <s:iterator value="%{#gp.colllist}" status="stat">
                                <td><s:label cssStyle="width: 400px">Plate No.</s:label></td>
                                <td id="tobeclonedplate"><s:textfield id="plateno" name="plateno" label="Plate No." /></td>
                            </s:iterator>
                        </tr>
                        <tr id="trfair">
                            <s:iterator value="%{#gp.colllist}" status="stat">
                                <td><s:label cssStyle="width: 400px">F.M. Value</s:label></td>
                                <td id="tobeclonedfair"><div class="inputContainer"><s:textfield id="fairmarketvalue" name="fairmarketvalue" cssClass="validate[required]" label="F.M. Value" /></div></td>
                            </s:iterator>
                        </tr>
                        <tr id="trlocation">
                            <s:iterator value="%{#gp.colllist}" status="stat">
                                <td><s:label cssStyle="width: 400px">Location</s:label></td>
                                <td id="tobeclonedlocation"><s:textfield id="location8" name="location" label="Location" /></td>
                            </s:iterator>
                        </tr>
                        <tr id="trgen">
                            <s:iterator value="%{#gp.colllist}" status="stat">
                                <td nowrap="true"><s:label cssStyle="width: 400px">General Condition</s:label></td>
                                    <td id="tobeclonedgen">
                                        <div class="inputContainer">
                                        <s:select
                                            cssClass="validate[required]"
                                            id="gencon8" name="gencon" label="General Condition"
                                            list="{'Excellent','Good','Fair','Poor'}"
                                            headerKey="-1"
                                            headerValue="Please Select"
                                            emptyOption="false"
                                            value="1" />
                                    </div>
                                </td>
                            </s:iterator>
                        </tr>
                    </table>
                </fieldset>
                <p><input type="button" id="btnappraisal" value="Add More"/></p>
                <table border="1">
                    <tr><td><s:label cssStyle="width: 400px">TOTAL FAIR MARKET VALUE</s:label></td><td><div class="inputContainer"><s:textfield id="totalfairmarketvalue" name="totalfairmarketvalue" label="totalfairmarketvalue" value="%{#gp.appraisal.totalfairmarketvalue}" cssClass="validate[required]" /></div></td></tr>
                    <tr><td><s:label cssStyle="width: 400px">TOTAL APPRAISED VALUE</s:label></td><td><div class="inputContainer"><s:textfield id="totalappraisedvalue" name="totalappraisedvalue" label="totalappraisedvalue" value="%{#gp.appraisal.totalappraisedvalue}" cssClass="validate[required]" /></div></td></tr>
                    <tr><td><s:label cssStyle="width: 400px">LOANABLE AMOUNT</s:label></td><td><div class="inputContainer"><s:textfield id="loanableamount" name="loanableamount" label="loanableamount" cssClass="validate[required]" value="%{#gp.appraisal.loanableamount}" /></div></td></tr>
                    </table>

            </s:div>
            <s:div id="buttons" cssStyle="float:right">
                <%--<s:if test="%{#privilege1e.allowable == true}">--%>
                <s:if test="%{#gp.appraisal.stat == 'saved'}">
                    <sj:a
                        name="postAP"
                        id="postAP"
                        onclick="postAP()"
                        button="true"
                        >
                        Post to Head Office
                    </sj:a>
                    <%--<sj:submit cssClass="ui-state-default" value="Post Appraisal" button="true" cssStyle="float:left;margin-top:2px;font-size:12px !important;font-family: Tahoma, Geneva, sans-serif !important;" />--%>
                </s:if>
                <s:else>
                    <h4>This appraisal was already posted.</h4>
                    <%--<sj:submit cssClass="ui-state-default" disabled="true" value="Post Appraisal" button="true" cssStyle="float:left;margin-top:2px;font-size:12px !important;font-family: Tahoma, Geneva, sans-serif !important;" />--%>
                </s:else>
                <%--</s:if>
                <s:else>
                    <s:if test="%{#gp.appraisal.stat == 'saved'}">
                        <h4>This appraisal report was already saved.</h4>
                <sj:submit cssClass="ui-state-default" value="Post Loan Application" button="true" cssStyle="float:right;margin-top:2px;font-size:12px !important;font-family: Tahoma, Geneva, sans-serif !important;" />--%>
                <%--</s:if>
                </s:else>--%>
                <%--<sj:a button="true" 
                      cssClass="default" 
                      cssStyle="float:left;
                      height:22px !important;
                      margin-top:2px;
                      font-size:12px !important;
                      line-height: 0;
                      font-family: Tahoma, Geneva, sans-serif;">
                    Cancel
                </sj:a>--%>
            </s:div>
        </s:if>
        <s:else>
            <s:div cssStyle="width: 200px; margin-left: auto; margin-right: auto">
                <h3> No appraisal yet.</h3>
                <p> Click <strong><em><a href="loanapplication.jsp?cat=appraise">here</a></em></strong> to add now. </p>
            </s:div>
        </s:else>
    </s:form>
</s:div>
</div>